Spring Cloud

Spring Cloud

“Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management, service discovery, circuit breakers, intelligent routing, micro-proxy, control bus, one-time tokens, global locks, leadership election, distributed sessions, cluster state). Coordination of distributed systems leads to boiler plate patterns, and using Spring Cloud developers can quickly stand up services and applications that implement those patterns. They will work well in any distributed environment, including the developer’s own laptop, bare metal data centres, and managed platforms such as Cloud Foundry.”


Spring Cloud remote config

In the big applications where there are multiple moving parts ( microservices ) there is a problem of configuration management. Microservices must be disposable applications that can be started and killed frequently, so would it just be awesome to hold configuration at one place and allow microservices to obtain the configuration from this single location.

We can easily manage all configurations on one place and all that is required for the microservices is to know what is the profile it is running in, for example PRODUCTION, STAGE …

In this post I will cover the Spring Cloud Remote Config using three config sources

  1. Native, where configuration is left on the hard disc
  2. Git, where configuration is stored in git repository
  3. Vault, this is my favorite all secrets are stored in vault
Spring Cloud with Spring Config and Eureka in high availability using docker swarm

Microservice architecture has many moving parts that must be deployed to production environment in a highly available way. In this post I will show you how to leverage docker swarm and scale your microservices to avoid SPoF and to meet the demand. First I will show you how to have two Eureka microservices that talk to each other and share information. Next I will scale Spring Config and Client microservices. Finally this will be deployed to docker swarm and monitored usingĀ Portainer.