$ account spring-cloud
This repository is the Spring Cloud integration layer for Netflix Eureka, providing both client-side service registration/discovery and an embedded Eureka server. It is a library, not a standalone application, designed to be consumed by Spring Boot microservices. The architecture is a multi-module Maven project with clear separation between client (`spring-cloud-netflix-eureka-client`), server (`spring-cloud-netflix-eureka-server`), and starter modules. In production, it enables Spring Boot applications to automatically register with a Eureka server, discover other services via `EurekaDiscoveryClient` or `EurekaReactiveDiscoveryClient`, and integrate with Spring Cloud LoadBalancer for zone-aware routing. The server module provides a full Eureka registry with a web dashboard, peer replication, and Micrometer-based metrics. The codebase demonstrates strong Spring Boot auto-configuration patterns, including conditional HTTP client selection (Jersey, RestClient, WebClient), health check aggregation, and config server bootstrapping. While actively maintained with a sophisticated release train CI system, the project carries significant technical debt from its long history. It still defaults to the deprecated Jersey HTTP client, relies on an older version of Netflix Eureka (2.0.6), and has several disabled flaky tests. The tight coupling to Netflix's proprietary libraries limits its reusability outside the Spring Cloud ecosystem, but the patterns it demonstrates for service discovery integration are well-crafted and instructive.
Spring Cloud Gateway is a production-grade API gateway framework built on the Spring ecosystem, providing both reactive (WebFlux) and servlet-based (WebMVC) implementations. It routes HTTP/HTTPS/gRPC/WebSocket traffic through a configurable chain of predicates and filters, supporting features such as path rewriting, header manipulation, rate limiting (Redis/Bucket4j), circuit breaking (Resilience4J), retry with backoff, response caching, load balancing, and distributed tracing (Micrometer/OpenTelemetry). The architecture is plugin-based: route predicates and filter factories are registered as Spring beans and composed via a fluent builder DSL or YAML/properties configuration. External dependencies include Project Reactor, Spring Cloud Load Balancer, Redis, and optional integrations with gRPC, OAuth2, and serverless functions. The codebase is organized into multiple Maven modules: the core server modules (spring-cloud-gateway-server-webflux and spring-cloud-gateway-server-webmvc) contain the routing engine, filter/predicate factories, and auto-configuration; proxy exchange modules provide lightweight annotation-based proxying; and integration tests cover HTTP/2, SSL, WebSocket, and gRPC scenarios. Key entry points include FilteringWebHandler (WebFlux) and GatewayRouterFunctions (WebMVC) for request processing, RoutePredicateHandlerMapping for route matching, and GatewayAutoConfiguration for bean wiring. The system is designed for extensibility: custom filters and predicates can be added by implementing GatewayFilter or RoutePredicateFactory and registering them as beans. Data flows follow a standard gateway pattern: an incoming request is matched against route definitions (loaded from properties, Redis, or service discovery), then passed through a chain of global filters and route-specific filters. Filters can modify the request/response, cache bodies, enforce rate limits, or invoke circuit breakers before forwarding to the backend via a configurable HTTP client (Netty-based for WebFlux, RestTemplate/WebClient for WebMVC). Observability is embedded via Micrometer metrics and OpenTelemetry tracing, with custom observation conventions for gateway-specific events.