Microservices as a Future Proof, and Reslient Architecture

Microservice Architecture is the common choice these days for modern engineering teams. While it is scalable, resilient and a future proof architecture, it does pose significant chalanges related to the abilities to test and manage such architecture.

Managing a smaller in size microservice is theoretically easier than manageing the larger in size monolith. However, the picture isnt as obvious when discussing dozens or hundreds of microservices. It becomes impossible to manage a large amount of services individually or manually, hence the popularity of orhastration sofwtare platform such as Kubernetes, docker-compose, docker swarm, ECS and others. Those tools were born from the need to manage a growing number of microservices. Oftent times, these tools are even tough to manage cusing developers to used managed solutions such as EKS, AKS, GKS etc.

Microservices Testability

Monolith

Excellent

Microservices

Poor

Definition

The ability to test the functionality of a system and prevent faults from reaching production

Monolith

Monolith is a mature architecture that has been used for close to 30 years. It has many available testing strategies, where the leading strategy is end-to-end testing that usually automates browsers to test a system end to end, focusing on user flows.

End-to-end solutions work best when the entire system can be tested as a blackbox to potentially surface most problems.

Microservices

Microservice architecture is relatively new and complex, especially when combined with tools such as Kubernetes and Docker that have great influence on the system behaviour.

While testing a single service in a Microservice architecture is theoretically easy, it often isn’t, as usually services are part of a larger business-logic dependent on other services to complete the logic. There are practices to support service-testing (e.g. mocks, API-contract testing), however, they are very complex and costly to implement.

If you look at modern CI pipelines, many times the services become inaccessible as they are under many layers of network and security operated by an external orchestrating software(e.g. Kubernetes).

Overall what was supposed to be a federation of lightweight de-coupled and testable services, become very challenging to test and prevent faults from reaching production.

Managing Microservices (Managability)

Monolith

Excellent

Microservices

Challenging

Definition

The skill-set and sofwtare required to manage tasks such as deployment, rollbacks, service discovery across dozens or hundreds of services in a way that you set it up once with expected behaviour in well defined or undefined conditions.

Monolith

Monoliths can be managed by their developers with minimum overhead for deployments.

Microservices

Microservices require management, otherwise it will become impossible to grow the number of services and reap the benefits. While one can build their own management solution, it is more likely that you’ll adopt one of the available orchestration solutions such as Kubernetes or Docker or opt to use a managed service such as ECS, EKS, GKE, AKS, Openshift or others. In any event Microservice Manageability is not only an overhead, it also requires a ‘devops’ skill-set that is usually different from a developer skill-set. Hence at the early days of the life cycle, the scarcity of the skill set and the overhead of implementation can inhibit velocity that is required in the early days.

Conclusion

The benefits of a Microservice architecture are quite obvious, however , this architecture also includes some challanges. Due to the popularity of this architecture, the open source community as well as commercial vendors have come up with solutions to overcome the challanges and reap only benefit from transitioning to a Microservice architcture. Open source tools like Kubernetes and Docker, Vendors Like Microsoft, Amazon, Google, Rehat and many others have come up with a managed solution to ease the operation of managing Microservices. There are also companies that have come up with a solution to make Microservices testable - UP9 is such company.

ABOUT UP9

UP9 provides an out-of-the-box test automation for microservices, kubernetes and cloud-native, replacing the need for developers to constantly build and maintain tests, while providing comprehensive service test-coverage.

Features:

  • Automatic generation and maintenance of CI-ready test-code, based on service traffic
  • Observability into API-contracts, business-logic and service architecture
  • Automatic reliability, test-coverage and root-cause analysis
  • Machine generated tests include functional, regression, performance and edge-case test-cases, covering all services and all service-endpoints

UP9 offloads the microservice testing workload from developers giving them precious time back.