Spring Cloud Risk Assessment & Management 2 — Questions and Answers
Question 1: Which Spring Cloud Circuit Breaker state transition occurs when the failure rate exceeds the configured threshold?
- CLOSED to HALF_OPEN
- OPEN to HALF_OPEN
- CLOSED to OPEN (Correct answer)
- HALF_OPEN to CLOSED
Correct answer: CLOSED to OPEN
When the failure rate exceeds the threshold in CLOSED state, Resilience4j transitions the circuit breaker to OPEN, blocking further calls.
Question 2: In Spring Cloud Config, what risk is mitigated by enabling the 'fail-fast' property on client services?
- Memory leaks during config refresh
- Services starting with stale or missing configuration (Correct answer)
- Unauthorized access to config properties
- Config server overload from too many clients
Correct answer: Services starting with stale or missing configuration
Setting spring.cloud.config.fail-fast=true ensures services refuse to start if they cannot reach the config server, preventing misconfigured deployments.
Question 3: A Spring Cloud Gateway route has no rate limiting configured. What is the primary risk this introduces?
- Increased TLS handshake latency
- Downstream service resource exhaustion from traffic spikes (Correct answer)
- JWT token expiration mismatches
- Service discovery cache invalidation delays
Correct answer: Downstream service resource exhaustion from traffic spikes
Without rate limiting, a traffic spike or DDoS can overwhelm downstream microservices, causing cascading failures across the system.
Question 4: Which Resilience4j metric should you monitor to detect slow degradation risk before the circuit breaker opens?
- resilience4j.circuitbreaker.calls.total
- resilience4j.circuitbreaker.slow.call.rate (Correct answer)
- resilience4j.circuitbreaker.state
- resilience4j.circuitbreaker.buffered.calls
Correct answer: resilience4j.circuitbreaker.slow.call.rate
The slow call rate metric reveals performance degradation early when calls are succeeding but taking too long, indicating an impending failure.
Question 5: In a Spring Cloud microservices architecture, what risk does service-to-service communication without mutual TLS (mTLS) introduce?
- Higher CPU usage on API Gateway
- Man-in-the-middle attacks and unauthorized service impersonation (Correct answer)
- Slower Eureka heartbeat intervals
- Ribbon load balancer cache staleness
Correct answer: Man-in-the-middle attacks and unauthorized service impersonation
Without mTLS, internal service traffic is unencrypted and unauthenticated, allowing an attacker with network access to intercept or spoof service identities.
Question 6: When using Spring Cloud Sleuth for distributed tracing, which risk does missing trace propagation headers introduce?
- Increased network latency between services
- Inability to correlate logs across service boundaries during incident investigation (Correct answer)
- Circuit breaker misidentifying healthy services
- Config server returning incorrect property values
Correct answer: Inability to correlate logs across service boundaries during incident investigation
Without trace context propagation, logs from different services cannot be linked to the same request, making root cause analysis extremely difficult during incidents.
Question 7: A team deploys a new Spring Cloud microservice version without a fallback strategy. Which risk management technique was neglected?
- Blue-green deployment with traffic shifting (Correct answer)
- Config server encryption
- Eureka zone affinity configuration
- Zipkin sampling rate adjustment
Correct answer: Blue-green deployment with traffic shifting
Blue-green deployment allows instant rollback by shifting traffic back to the previous version if the new deployment introduces failures.
Which Spring Cloud Circuit Breaker state transition occurs when the failure rate exceeds the configured threshold?