Netflix OSS/ Spring Cloud incubator pack
The purpose of the Netflix OSS/ Spring Cloud incubator pack is to provide you with a basic understanding of all the components of the stack implemented using Spring Cloud components. The pack attempts to give you an understanding of what their function is and how to integrate them within a microservice ecosystem.
This incubator is structured around reading material that will prepare you to complete practical assignments and be able to quickly and easily set up a scalable microservice platform.
In this incubator pack, we will be relying heavily on Spring Boot and all its magic - dependency injection, IOC, AOP, Auto-Configuration. A basic understanding of Spring and Spring Boot will be advantageous in order to help you understand and master the topics in the incubator. If you are still a bit unfamiliar with these basics or you simply need to brush up, work through the video tutorial playlists below then come back.
Additional reading material
The Spring Cloud stack is fully geared towards a microservice architecture style. It's recommended you have a good understanding of the dos and don'ts of micro-services.
- Microservices: https://dzone.com/articles/microservices-design-principles
If you need some help in setting up each component individually, here are some great tutorials on how to set these up:
Zuul has two main function. Filtering traffic and routing requests to the micro-services within the ecosystem that have been registered with Eureka. Zuul offers a flexible mechanism to create powerful filters should you need it.
- Authentication and Security
- Insights and Monitoring
- Load Balancing
- Static Response handling
- Multiregion Resiliency
Within a microservice architecture, service discovery and orchestration can become difficult to manage. To scale effectively we cannot rely on the old point and shoot to consume services. We need the ability to dynamically find and add more instances of our services. For this, we use Eureka - Spring Cloud's defacto service registry.
eureka has two components
- The Eureka Server - which houses the services instance information (host, port, context).
- Eureka Clients - which registers service information on the Eureka server and uses it to locate instances for the different service clients.
The Cloud Config server allows us to externalize application configuration properties. This externalisation of environment properties allows us to dynamically update configurations without restarting our services incurring no downtime. Additionally, it is backed by a git repository, adding configuration management out the box.
- Create two Spring boot applications (Service and ServiceB)
- Create a Spring Cloud config server
- Create config for these two services on the config server and have the services pull their config from here
- Create a Eureka server
- Register Services A and B on Eureka
- Make service to service call from A to B
- Create Zuul proxy and setup to expose services that are registered on Eureka
- Call A trough Zuul
aFTER THE INCUBATOR
Now that you have a small ecosystem up and running there are a few things to consider.
How do you make it easy to create a new micro-service and slot it into the ecosystem?
How far could this architecture stretch before it starts failing?
Is the Netflix OSS the right solution for you?