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
| Need | Typical choice in Spring shops | Alternative seen at Amazon/Uber scale |
|---|---|---|
| Discovery | Eureka, or Kubernetes Services | Custom registries, service mesh (Istio, Envoy) |
| Gateway | Spring Cloud Gateway | AWS API Gateway, Kong, NGINX, Envoy |
| Config | Spring Cloud Config, Kubernetes ConfigMaps | AWS AppConfig, Consul, internal tools |
| Resilience | Resilience4j | Service mesh retries/timeouts |
| Messaging | Kafka with Spring Kafka / Cloud Stream | Kafka (Uber, Swiggy, Flipkart), Amazon SQS/SNS |
| Tracing | Micrometer Tracing + Zipkin/Tempo | Jaeger (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:
| Step | Add | Problem solved | Level |
|---|---|---|---|
| 1 | product, order, user, payment services + RestClient | Independent services (done in this level) | Basic |
| 2 | Eureka + LoadBalancer | No hard-coded URLs; many instances | Medium |
| 3 | Spring Cloud Gateway on :8080 | One entry point for the React app | Medium |
| 4 | Config Server | One place for configuration | Medium |
| 5 | OpenFeign + Resilience4j | Clean clients, no cascading failures | Medium |
| 6 | Kafka "OrderPlaced" event | Loose coupling for email, stock, analytics | Medium |
| 7 | Saga, tracing, Docker/Kubernetes, CI/CD | Production-ready system | Advance |
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-serviceExample
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"