Skip to content

giocosmiano/exploring-spring-boot-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Further readings

Dynamically registering and discovering services with Eureka

  • Netflix Eureka provides the means for micro services to power up, advertise their existence, and shutdown as well. It supports multiple copies of the same service registering themselves, and allows multiple instances of Eureka to register with each other to develop a highly available service registry.

  • Spring Cloud Netflix Eureka

  • Spring Cloud Netflix

Micro-service circuit breakers

  • Annotation, @EnableCircuitBreaker, enables Netflix Hystrix, the circuit breaker solution

  • In short, a circuit breaker is something that, when it detects a certain threshold of failure, will open the circuit and prevent any future remote calls for a certain amount of time. The purpose is to prevent cascade failures while giving the remote service an opportunity to heal itself and come back online. Slamming a service in the middle of startup might be detrimental

Spring Cloud Config

  • Spring Cloud Config Server

  • One thing that quickly adds up when building a micro service-based solution are all the properties that must be managed. It's one thing to manage a single application's application.yml file, and make tweaks and adjustments. But working with all these services, and having to jump to the correct file underneath each application's src/main/resources folder quickly becomes daunting. On top of that, when trying to make changes or adjustments, it is easy to overlook the settings of one micro service

  • A key piece of the Twelve-Factor App is externalizing configuration. We already took a big step using Spring Boot's powerful property support. But Spring Cloud brings another key technology to the table that takes property support to the next level--Spring Cloud Config Server

  • The Config Server let us put all the properties into a centralized location, and feed them via an application to our existing micro services

  • It's important to note that spring-cloud-starter-config is for clients to the Config Server. The dependency that was added to the Config Server itself was spring-cloud-starter-config-server, which is only needed to create a Config Server

  • There is a certain order by which Spring Boot launches things. Suffice it to say, property sources must be read early in the Spring lifecycle in order to work properly. For this reason, Spring Cloud Config clients must have a bootstrap.yml file

  • By default, Spring Cloud Config clients will seek {spring.application.name}.yml, so if spring.application.name=eureka then it'll seek eureka.yml

  • To retrieve different versions of configuration settings, we have to set in bootstrap.yml to fetch an alternative label referring to either a branch or a tag

  • IntelliJ MultiRun plugin to group together several launch configurations into a single command.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published