4. Making Architecture Choices Flashcards
At which step of developing a Microservices architecture should you consider CI/CD pipelines?
They’re one of the first things you should consider. Don’t write any code until you have a plan on how to handle this task. It is such an important concept in a microservices architecture that it should ideally be task number one.
What is the second aspect to consider when developing a Microservices architecture, and what are the considerations around it?
Logging and tracing. This should really be a primary function of every service, so the code required to do this work should be in a common library for every artefact to consume.
Consider how you will aggregate and evaluate your logs and metrics, and design your code to solve that need. Consider the use of log aggregators and search mechanisms for those logs early on so you can structure your data in your log messages appropriately.
What should you consider leveraging when it comes to your service code in developing a Microservices architecture, and why?
Domain-Driven Design.
You need to do some real analysis on the system as a whole and use that knowledge to help you define service boundaries. Consider how you will build your services and what functions they will perform.
What should be the considerations around latency in developing a Microservices architecture and why?
The use of non-blocking code when possible and standardising your stack no matter which way you go.
If you design your services asynchronous first unless you can prove that a certain service needs synchronous operations. This will not only reduce latency on your system as a whole, but will allow you to improve your skills on these operations while reducing error rates.
Also, standardisation allows us to shift resources much more easily as the business needs change.
What are the drawbacks associated with the distribution tax in a microservices architecture, what are some of the benefits?
There’s a significant cost of building out a distributed system, but you also get several benefits from this. One of the significant benefits is well-defined module boundaries — it is a lot harder to write tightly coupled code when you go across the service boundary to make a call. In addition, you get a much easier path of scaling your system.
What are the issues of complexity in a microservices architecture?
The ability to scale that comes with microservices increases the complexity of our deployments. There are just so many moving parts in microservices that the complexity of this process is increased dramatically.
What are the tradeoffs associated with the ability to have diversity in your tech stack in a microservices architecture?
The ability to write your services in any technology comes with real operational costs. You can fully embrace polyglot development if you want, but managing these services in production when they follow different rules can be a huge challenge. It is oftentimes better to embrace smaller set of technologies to improve your ability to manage operations.
What are outbound edge services used for?
Exposing your client’s specific needs to the outside world.
What is inbound/translation edge services used for?
Abstracting you from third-party dependencies.
What are the two kinds of edge services?
- Outbound Edge Services
2. Inbound/Translation Edge Services
What are the key benefits of edge services?
- Manage code transformations similar to other code in your system.
- Provide a consistent interface even if underlying services change
What is the single most effective way to be successful in a microservices architecture?
To build it into your culture. A DevOps culture is a perfect fit for building out a microservices architecture because the two compliments each other’s strengths while mitigating the weaknesses.
What does DevOps aim to do?
Bring the conversation between operations and development into the same sphere.
Why is a DevOps culture a perfect fit for a team that leverages a microservices architecture?
Most of the issues of microservices can be seen as operational issues and monitoring the system remains the most important aspect. A platform of continuous monitoring and automated responses become a necessity for operations. DevOps aims to leverage automation and embed the work into the development function.
What does the combination of unified logging practices and leveraging DevOps bring to the table for a microservices architecture?
Automated monitoring. Once we have the data in a unified and structured format, we can write code to respond in an automated fashion. This allows increased response times or increased error messages to trigger re-paving of the infrastructure or at the very least a pager call, providing better response time to system events.