How to Shrink from 5 Tiers to 2 in a Multitier Microservices Architecture
Five tiers — isn't it too many? Yeah, that's what we think too. So we've come up with an idea to shrink the whole bunch of tiers down to just a couple. The web proxy and database proxy are combined into one tier, now just a proxy. The application server, the cache, and the DBMS are packed into the other tier. Fewer tiers means less problems and more bonuses like data consistency and better performance. In this session, I'll explain how to do this magic and how it works under the hood.
A typical microservice architecture has five tiers:
- you need a web proxy like NGINX to handle slow clients and to serve static files,
- you need an application web server like Apache or Django to run your application logic,
- you need a caching layer like Memcached or Redis to cache frequently accessed data,
- you need a database proxy to handle sharding and replication, abstracting that stuff away from the application,
- and you need a database management system to store your data.
Five tiers – isn't it too many? Yeah, that's what we think too. So we've come up with an idea to shrink the whole bunch of tiers down to just a couple. The web proxy and database proxy are combined into one tier, now just a proxy. The application server, the cache, and the DBMS are packed into the other tier. Fewer tiers mean less problems and more bonuses like data consistency and better performance. In this session, I'll explain how to do this magic and how it works under the hood.