Well, so it turns out the hidden “data transfer fee” costs of MongoDB Atlas are actually kind of insane. As such, I saw fit to get away from the idea of using the cloud service sooner rather than later, as it threatened to force a rethink of using MongoDB altogether.
2 days after that realisation the PTR is now running on a self-hosted MongoDB cluster. This was really tricky to set up for the first time, and I had to change how Hero IDs are assigned as I was using a cloud-only feature to increment them previously.
- I have not migrated the PTR data from the cloud platform, you will need to re-create your PTR accounts
- PTR and Live client screenshots are now in different directories
- The server will now persist data locally if the database is unreachable
- The server will now rescue locally persisted data and save it to the database on login
- PTR Game server & PTR API service are now using my self-hosted MongoDB ReplicaSet
- New character ID generation rewritten not to rely on MongoDB Atlas Trigger
- Client now links to PTR download page instead of main download page if it is out of date and a PTR build
I’ve never ran a MongoDB ReplicaSet before and setting it up was an exercise in oh my god what am I taking on this time. Everything appears to be functioning at face value, however there could be things that are broken or not configured so as per the initial PTR I would very much appreciate some “check the basic things work” testing!
Once again, those who wish to help, please test the following and report anything you find back on discord in #ptr-discussion and #ptr-bugs:
- Account creation
- Email verification
- Character creation
- Character deletion
- Email Transfers
- Your character position is persisted on logout
- The PTR API is correctly reporting your player data (https://ptr.miragerealms.co.uk/v1/armoury/YourCharacterName)
Thank you very much