#distributedcomputing

waynerad@diasp.org

You may have noticed that the largest internet tcompanies have rewritten their code to use a microserivces architecture, but your intuition as to why may be limited. Amazon, Google, eBay, Walmart, Netflix, etc, have all done this. The obvious reason is that a monolith has trouble scaling beyond a small set of physical machines. The less obvious reason is that the microservices architecture enables many versions of the same service to be running at the same time, which allows the large-scale system to exist in a state of continuous transition, with extensive service-level testing, to increase the reliability of the system and development speed, and ability to "canary test" deployments on small numbers of users, and gradually roll out to everybody as everything is proven to be working.

This talk by Randy Shoup, who worked with eBay on their microservices architecture, as well as other companies, also gives key recommendations on how to do a microservices architecture properly: Make it event-driven, with microservices consuming and producing asynchronous events, make an append-only, but otherwise immutable, log of events that can be replayed, use one service as the authoritative source of any piece of data, but allow read-only caches in many other places for speed, and update data in a reversable way, so if downstream events fail, updates can be reversed, achieving the equivalent of "distributed transactions", something otherwise impossible.

Large-scale architecture: The unreasonable effectiveness of simplicity - Randy Shoup - YOW! 2022

#solidstatelife #distributedcomputing #microservices