Spring Cloud Research & Evidence-Based Practice 3 — Questions and Answers
Question 1: Case studies of teams migrating monoliths to Spring Cloud microservices most frequently cite which anti-pattern as the root cause of performance regression?
- Using Feign clients instead of RestTemplate
- Distributed monolith: microservices that require many synchronous calls to peers for every request, creating chatty inter-service communication (Correct answer)
- Deploying services in separate Docker containers
- Using Spring Cloud Config for externalized configuration
Correct answer: Distributed monolith: microservices that require many synchronous calls to peers for every request, creating chatty inter-service communication
A 'distributed monolith' retains tight coupling through excessive synchronous inter-service calls, negating microservices benefits and adding network overhead compared to the original monolith.
Question 2: Evidence-based guidance on Resilience4j circuit breaker sliding window sizing recommends which approach when establishing initial thresholds?
- Set window size to 100 and failure threshold to 50% based on production traffic baselines, then refine using real error-rate data (Correct answer)
- Use library defaults permanently, as they are pre-tuned for all production scenarios
- Set failure threshold to 1% to catch any error immediately
- Always use a time-based window regardless of traffic volume
Correct answer: Set window size to 100 and failure threshold to 50% based on production traffic baselines, then refine using real error-rate data
Starting from observed production baselines (traffic volume, normal error rates) and iteratively refining thresholds prevents both false-positive trips and missed failures.
Question 3: When reviewing Micrometer metrics emitted by Spring Cloud applications in Grafana, which metric is most useful for detecting upstream service degradation before users are impacted?
- JVM heap used
- http.client.requests p99 latency trending upward over time (Correct answer)
- Spring Boot startup time
- Number of active database connections
Correct answer: http.client.requests p99 latency trending upward over time
Rising p99 latency on outbound HTTP client calls indicates a deteriorating upstream service, providing a leading indicator before error rates spike or circuit breakers open.
Question 4: A research review comparing Spring Cloud Kubernetes versus Spring Cloud Netflix for service discovery finds which primary operational advantage of Spring Cloud Kubernetes?
- Spring Cloud Kubernetes provides built-in circuit breaking that Eureka lacks
- It leverages native Kubernetes Services and ConfigMaps, eliminating the need to run and maintain a separate Eureka server (Correct answer)
- Spring Cloud Kubernetes has lower memory usage per service instance
- It supports multi-region discovery across cloud providers natively
Correct answer: It leverages native Kubernetes Services and ConfigMaps, eliminating the need to run and maintain a separate Eureka server
Spring Cloud Kubernetes uses the Kubernetes control plane for service discovery and configuration, removing the operational burden of running Eureka as additional infrastructure.
Question 5: Evidence from SRE practice suggests that a Spring Cloud LoadBalancer health-check interval should be determined by which criterion?
- A fixed 30-second interval suitable for all services
- The maximum time an unhealthy instance can serve traffic before causing a measurable SLO violation (Correct answer)
- The garbage collection pause time of the service
- The average request duration of the service
Correct answer: The maximum time an unhealthy instance can serve traffic before causing a measurable SLO violation
Health-check interval should be driven by how quickly an unhealthy instance must be removed to keep errors within SLO bounds — working backward from the error budget.
Question 6: Post-incident analysis of Spring Cloud Config Server outages most often implicates which failure mode as the initial trigger?
- Services caching configuration too aggressively
- The Git backend becoming unavailable, causing Config Server health checks to fail and triggering downstream restart loops (Correct answer)
- Incorrect YAML indentation in property files
- Spring Boot version mismatches between Config Server and clients
Correct answer: The Git backend becoming unavailable, causing Config Server health checks to fail and triggering downstream restart loops
Config Server's dependency on a remote Git backend means any Git outage (rate-limiting, network issues, credentials expiry) can cascade to all dependent services at startup.
Question 7: Research on Spring Cloud Gateway filter ordering shows that which filter executes last in the response phase by default?
- Pre-filters defined with the highest order value
- GlobalFilters with Ordered.LOWEST_PRECEDENCE
- RoutePredicateHandlerMapping
- NettyWriteResponseFilter, which writes the proxied response back to the client (Correct answer)
Correct answer: NettyWriteResponseFilter, which writes the proxied response back to the client
NettyWriteResponseFilter is responsible for flushing response bytes back to the caller and must run after all other response-mutation filters have completed.
Case studies of teams migrating monoliths to Spring Cloud microservices most frequently cite which anti-pattern as the root cause of performance regression?