Weekly Tech Notes #14: Multitenancy
🎬 This week’s video is not technical but worth watching. It’s the fastest Super Mario Bros speedrun with a time of 4:54.631, achieved less than two weeks ago (at the time of writing). The previous record was 4:55.230. Have fun!
This time, readings are all about multi-tenancy, from the basics to more advanced topics like rate limiters and fairness.
- Multitenancy in action – An easy-to-follow introduction to multitenancy with some initial considerations on how to structure different layers: URLs, code and database.
- Scaling your API with rate limiters – A succinct but clear explanation about the different rate limiters at Stripe. The article also illustrates some implementation details using a token bucket algorithm and links to a Gist with a pseudo/Ruby code.
- Multitenancy and fairness in the context of microservices. An introduction to the concept of sharded queue. – Achieving fairness in a multitenant queue by implementing a circular queue containing the shard IDs and a queue per shard. When dequeuing a message, pick the next shard ID from the circular list and dequeue a message from the corresponding queue.
- Fairness in multi-tenant systems – A long article with some insights from the AWS ecosystem which gives a good idea of how fairness is a complex topic.