3 ms·
Running microservices is like running a city: you need roads, highways, police departments, fire departments, and so on. Without an abstraction layer and prope
by fosk 9y ago
Running microservices is like running a city: you need roads, highways, police departments, fire departments, and so on.
Without an abstraction layer and proper planning, different teams will start building microservices with lots of common functionality like security, authentication, logging, transformations that over time will increase the complexity and the fragmentation of the entire system. Ideally you would want services to simply receive a network request, serve a response, and delegate all the complimentary middleware execution somewhere else, like an API gateway.
Traditionally API gateways in a pre-container world were centralized in front of an API, but modern API gateways can also run in a decentralized way alongside your server process, to reduce latency.
Then once you have everything in place, you end up with a bunch of microservices that your developers (maybe belonging to different departments) will have to use. You will need to fix discoverability, documentation and on-boarding. Some of these services may be also opened up to partners, so there's that too. Traditionally developer portals were only being used for external developers, but they are becoming a requirement for internal teams as well.
Finally, you need to carefully monitor and scale your services. Without a proper analytics and monitoring solution in place it will be impossible to detect anomalies, scale horizontally each service independently, and having an idea of the state of your infrastructure.
Generally speaking running microservices can be split in two parts:
1. Building the actual microservice.
2. Centralizing common functionality, documentation/on-boarding and analytics/monitoring.
Most of the developers or project managers I regularly speak to tend to forget the second part.
Disclaimer: I am a core committer at Kong[1]
[1] https://github.com/Mashape/kong https://github.com/Mashape/kong
- api_or_ipa 9y agoKong is an amazing piece of microservice architecture. I've been very happy with how it behaves.
- dexterbt1 9y agoThis. I really like the analogy that of running a city. There are just so many concerns in and around building and running microservice architectured systems: security, logging/analytics, failure modes/recovery/detection/self-healing, message protocol versioning, data persistence, capacity scaling and many more. Much of these are easy to defer/overlook early in dev't stage but will later become very hard, if not impossible to incorporate in. Btw, we thank you and your team as we are Kong users as well. :)