I've been exploring the possibility of using a cloud based "serverless" DB as a drop-in replacement for mongodb. This is the only remaining component in the nodeBB architecture that is currently relatively difficult to scale without over-provisioning for peak capacity. There are a couple of candidates that appear to qualify on paper. The first being Cosmos DB
- Serverless deployments: Cosmos DB for MongoDB offers a serverless capacity mode. With Serverless, you're only charged per operation, and don't pay for the database when you don't use it.
- Free Tier: With Azure Cosmos DB free tier, you get the first 1000 RU/s and 25 GB of storage in your account for free forever, applied at the account level. Free tier accounts are automatically sandboxed so you never pay for usage.
I was able to dump and restore to Cosmos relatively easily

of course nothing ever works the first time out as nodeBB refused to start
2023-05-18T16:40:46.781Z [4564/21343] - error: MongoServerError: Error=2, Details='Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 1a6747b1-c46c-4fb1-9847-f9a788f35376; Reason: (Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 1a6747b1-c46c-4fb1-9847-f9a788f35376; Reason: (Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 1a6747b1-c46c-4fb1-9847-f9a788f35376; Reason: (Message: {"Errors":["The index path corresponding to the specified order-by item is excluded."]}
I haven't had a chance to dig deeper, but will do so at some time.
The next candidate is Tigris, which is promising because it promises
MongoDB compatibilty as well as enhanced full text search.
- Cloud-native architecture: Tigris follows a modern composable architecture with loosely coupled components. Furthermore, compute is separated from storage, allowing for independent scaling and a more resilient system.
- Automatic database sharding: Tigris provides automatic database sharding, and shard keys are unnecessary as the data distribution is automatically handled. This includes both sharding and optimizing the number of shards. MongoDB Atlas requires you to specify and manage sharding to horizontally scale. With Tigris you get more time to focus on developing applications for your users.
Cost-efficient and unlimited scalability: Unlike MongoDB Atlas, Tigris can scale to millions of records read and written per second and petabytes of data storage at a fraction of the cost