What are microservices, why and when would you need them, and what are the consequences and actions that should follow from choosing this path. In order for me to prevent RSI from setting in, I’d like to share this document that nicely sums the most important stuff up, without choosing a specific implementation.
Martin Fowler about the definition of Microservices
google’s one to rule them all solution for running containers. Derived from their internal container management system called ‘Borg’
container orchestration on mesos.
a way of running containers on a machine
Databases in the cloud
Running stateless containers is easy. You can roll them out anywhere and any time. But stateful containers with e.g. your database are a whole different cookie. Netflix did this on AWS.
Netflix on moving their database to AWS
They have set up a Distributed Replicated Block Device over multiple clusters. This ensured that the each cluster would have a Master which could be elected in case the leading master would have an outtage.
I still wonder
- having one writeable master seems like a major SPOF
- how do you optimize writing when that becomes an issue
- how does the election process work in case of a loss of communication between zones. will each zone then elect their master as the single truth? And how will you be able to recover from that? There will rapidly occur discrepancies between masters and syncing will be killing, because ID’s where handed out in regard to different content.
p.s. this site is worth looking around at. There’s a whole load of goodness there to be found.
Uber has also dockerized their MySQL.
Each MySQL node basically mounts its file structure for MySQL’s data-dir from the host-system. All MySQL nodes get started with read-only properties. Only one specific node will get the property to write.
I still wonder
- how will this work when you run on e.g. GCE / GCP. I don’t believe that mounting directly from your host-os is considered best-practise.
- this brings solutions to read-optimized systems, but how to optimize writes in this setup
- many to read, only one to write, how to overcome this lifelong issue with RDBMSses