Real World Example

From Netflix OSS to Spring Cloud

Netflix built its microservice tools in-house and open-sourced them as Netflix OSS: Eureka (discovery), Ribbon (load balancing), Hystrix (circuit breaker) and Zuul (gateway). Spring Cloud Netflix wrapped them in Spring Boot starters, which is how thousands of companies, including many Indian banks, insurers and e-commerce firms, built their first microservices. Today Netflix itself runs Spring Boot as its standard Java backend stack, and the retired tools have been replaced by LoadBalancer, Resilience4j, Spring Cloud Gateway and Micrometer.

Which Tools Companies Pick

NeedTypical choice in Spring shopsAlternative seen at Amazon/Uber scale
DiscoveryEureka, or Kubernetes ServicesCustom registries, service mesh (Istio, Envoy)
GatewaySpring Cloud GatewayAWS API Gateway, Kong, NGINX, Envoy
ConfigSpring Cloud Config, Kubernetes ConfigMapsAWS AppConfig, Consul, internal tools
ResilienceResilience4jService mesh retries/timeouts
MessagingKafka with Spring Kafka / Cloud StreamKafka (Uber, Swiggy, Flipkart), Amazon SQS/SNS
TracingMicrometer Tracing + Zipkin/TempoJaeger (built at Uber), OpenTelemetry

ShopEase Roadmap

This is how ShopEase grows through the rest of the course. Each step adds one Spring Cloud component and solves one real problem:

StepAddProblem solvedLevel
1product, order, user, payment services + RestClientIndependent services (done in this level)Basic
2Eureka + LoadBalancerNo hard-coded URLs; many instancesMedium
3Spring Cloud Gateway on :8080One entry point for the React appMedium
4Config ServerOne place for configurationMedium
5OpenFeign + Resilience4jClean clients, no cascading failuresMedium
6Kafka "OrderPlaced" eventLoose coupling for email, stock, analyticsMedium
7Saga, tracing, Docker/Kubernetes, CI/CDProduction-ready systemAdvance

A Peek at Step 2

Once Eureka and LoadBalancer are added, the only change in order-service's client is the URL: a service name instead of host and port. This is what the medium level builds:

@Configuration
class ClientConfig {
    @Bean
    @LoadBalanced                       // resolve "product-service" through the registry
    RestClient.Builder loadBalancedBuilder() {
        return RestClient.builder();
    }
}

// application.yml
// shopease.services.product-url: http://product-service

Example

Eureka dashboard after starting two product-service instances:

curl -s localhost:8761/eureka/apps -H "Accept: application/json" | jq ".applications.application[].name"

Example output

"PRODUCT-SERVICE"
"ORDER-SERVICE"