chapter two

2 Exploring the microservices world with Spring Cloud

 

This chapter covers

  • Understanding the technologies of Spring Cloud
  • Understanding the principles of cloud native applications
  • Understanding the Twelve-Factor App best practices
  • Using Spring Cloud to build microservices

Nowadays, organizations have been forced to look for architectures that are more flexible and that are more consistent with their new agile development trends due to the competition that exists between companies, causing them to quickly face unprecedented challenges without having a proper time to plan and implement new ideas. In response to these new challenges, engineers have developed the microservices architectures. This architecture offers developers and companies that manufacture software the ability to quickly build and deliver experiences without affecting other services. Also, it offers a continuous improvement (integration and delivery) environment that reduces errors caused by manual processes.

Designing, implementing, and maintaining microservices can quickly become a problem if they are not managed correctly. It is because of this that when we start working with microservices solutions, it is essential to apply best practices that allow us to keep the architecture as efficient and scalable as possible to avoid performance issues, bottlenecks or operational problems inside our product.

As we continue our discussion of microservices architectures, keep the following in mind:

2.1      What is Spring Cloud?

2.1.1   Spring Cloud Config

2.1.2   Spring Cloud Service Discovery

2.1.3   Spring Cloud Load Balancer and Resilience4j

2.1.4   Spring Cloud API Gateway

2.1.5   Spring Cloud Stream

2.1.6   Spring Cloud Sleuth

2.1.7   Spring Cloud Security

2.2      Spring Cloud by example

2.3      How to build a cloud-native microservice?

2.3.1   Code Base

2.3.2   Dependencies

2.3.3   Config

2.3.4   Backing services

2.3.5   Build, release, run

2.3.6   Processes

2.3.7   Port binding.

2.3.8   Concurrency

2.3.9   Disposability

2.3.10    Dev/prod parity

2.3.11    Logs

2.3.12    Admin processes

2.4      Making sure our examples are relevant

2.5      Building a microservice with Spring Boot and Java

2.5.1   Setting up the environment