Hello-world Problems
02 Nov 2021Goal
- To review our helloworld microservice against the tenets of microservice architecture, and see where and how it falls short.
Discussion
Here is a quick review of where our little microservice stands, in terms of the “microservician” utopia:
Tenet | State | Observation |
---|---|---|
Loosely coupled | Neutral | N/A? We just have one service. Nothing to couple yet. We will get there :) |
Cohesive | Neutral | Not a lot of cohesion to discuss with helloworld. So, same as above. |
Deployable | Bad | Sure, it is deployable, but if we were to deploy this across a bunch of VMs, it quickly becomes a chore. On complex applications with a lot of dependencies, it is a disaster waiting to happen. |
Reliable | Bad | Well, if our VM goes down, we don’t have anywhere to get our hello, do we? |
Scalable | Bad | If a lot of people want our precious hello service, my puny little 2-core 2GB RAM VM will surely buckle down and choke. Now, see Reliable. |
Maintainable | Bad | How do I deploy patches to my code or dependencies? How do I roll out the inevitable security update that needs to go out yesterday? Bring down my service, take an outage and perform maintainance? |
Observable | Bad | I know next to nothing about how my service is being used. I don’t have any logs, metrics or end-to-end tracing. |
Evolvable | Neutral | Same as coupling and cohesiveness, we can discuss evolvability only after adding more complexity to our setup. |
Summary
Before building further, we did a quick review of our service and convinced ourselves that we have a long way to go.