- Published on
Update: Late November 2021
- Authors

- Name
- Kaito Kikuchi
- @chorkaichan
Late November
In late November I went to Okayama for a choir competition, had singing rehearsals, and did some design work unrelated to development, so it was hard to find time.
That said, all the travel time meant I got a lot of studying done, and my plan for building the database became clear. This post is my notes on that.
Development Updates
Choosing a Database
Since we use AWS, the candidates were roughly RDS, DynamoDB, and DocumentDB. I ruled out DocumentDB because it's expensive. I also added MongoDB to the list, since it recently got a serverless offering and the price is cheap at 0.3 USD per million reads per day (and at our current scale, the free tier is more than enough).
The data I have in mind is limited to things like user information and content information. It's also a young service, so the usage patterns haven't fully settled, and breaking changes may come later. With that in mind, here are the pros and cons of each database.
RDS
- △: [Flexibility] An RDBMS. As long as you normalize your data, you can pull it out flexibly with queries. Schema changes are a pain, though.
- △: [Scalability] To handle a sudden jump in users, you have to think about things like auto-scaling settings.
- ×: [Cost] Has a free tier. Since it's an always-on instance, you're billed even when it isn't being used.
DynamoDB
- ×: [Flexibility] A KVS. Because the schema is denormalized, a single change may require a Scan. Designing a schema while the usage patterns are still unsettled is also risky.
- ◯: [Scalability] Scales horizontally, so it can quickly handle a sudden jump in users.
- ◯: [Cost] Has a free tier. Billing is based on the number of reads and writes, so it's relatively cheap.
MongoDB
- △: [Flexibility] A document-oriented DB. It supports joins like an RDB, so you can lay out data with normalization in mind. Schema changes are easy too. However, moving from the free tier to the serverless version may currently involve downtime? (needs checking)
- ◯: [Scalability] Scales horizontally, so it can quickly handle a sudden jump in users.
- ◯: [Cost] Has a free tier. Billing is based on the number of reads and writes, so it's relatively cheap.
Putting all of this together, I'm currently leaning toward MongoDB. If I end up needing simple but high-volume I/O, like logs, I might consider DynamoDB. If you have other recommendations, please let me know in the comments.
Plans for Early December
I expect to share more news about auditorium before the end of the year, and I'll be busy with that work in early December. Refactoring auditorium and moving it to AWS will probably start around the end of the year. I'd like to wrap it up within the fiscal year, but we'll see how it goes... I'll keep posting updates here.