Spring Cloud components
24 questions in 7 subtopics.
Service discovery
How does service discovery with Eureka work for a Spring Boot client, and how does it compare with Kubernetes service discovery?During a deployment, callers get connection refused errors for about 30 to 90 seconds when instances of a Eureka-registered service shut down. Why, and how do you fix it?Spring Cloud Netflix components were once the standard; now platforms like Kubernetes and service meshes cover discovery, routing and resilience. How do you decide which concerns stay in application libraries and which move to the platform?Spring Cloud Config
How does a Spring Boot application load configuration from Spring Cloud Config Server, and how do@RefreshScope and /actuator/refresh work?A bad configuration change pushed through Spring Cloud Config with Bus refresh took down all 40 instances of a service at once. How would you change the configuration delivery process?Your platform runs on Kubernetes. Teams use Spring Cloud Config, ConfigMaps, Vault and environment variables inconsistently. What configuration strategy would you standardise?Incident reviews show that about a third of production incidents in the last two years were caused by configuration changes, many applied at runtime through Spring Cloud Config refresh. How would you change configuration governance across the company?Spring Cloud Gateway
Configure a Spring Cloud Gateway route that sends /api/orders/** to the orders service discovered as lb://orders, strips the /api prefix, and adds a request header X-Source: gateway.Requests through Spring Cloud Gateway (WebFlux) intermittently fail with "Connection prematurely closed BEFORE response" errors to one backend. What could cause this and how would you investigate?What responsibilities belong in an API gateway built with Spring Cloud Gateway, and which should stay in the services? A team wants to put business validation and aggregation logic in the gateway.Your company has 100 services behind a mix of NGINX ingress, an old Zuul gateway and a cloud API gateway. Should Spring Cloud Gateway become the standard edge, or should you use a managed gateway or ingress? How would you decide and migrate?Your API edge is built in-house on Spring Cloud Gateway with many custom filters. A vendor offers a full API management platform. How would you decide between continuing to build and buying, over a five-year horizon?Client-side load balancing
How does Spring CloudLoadBalancer work with a @LoadBalanced RestClient.Builder or WebClient.Builder, and what replaced Netflix Ribbon?Your services run in three availability zones. Cross-zone traffic is costly and one zone's instances are slower. How would you use client-side load balancing to handle this?OpenFeign
Write an OpenFeign client for GET /customers/{id} on the customers service with a 2 second read timeout, and explain how errors are handled by default.Spring Cloud OpenFeign is considered feature complete. What alternatives does Spring offer for declarative HTTP clients, and how would you decide whether to migrate?There are 200 OpenFeign clients across your services with different timeout, retry and error-decoding settings. Define a standard for HTTP clients and decide whether to migrate to Spring HTTP interface clients.Spring Cloud AWS
Using Spring Cloud AWS 3.x, write a listener that consumes messages from an SQS queue named orders and converts JSON to an Order record. What happens if the listener throws?How would you load secrets and configuration from AWS Secrets Manager and Parameter Store into a Spring Boot service with Spring Cloud AWS, and what are the operational trade-offs?Teams want to use Spring Cloud AWS integrations (SQS, SNS, S3, DynamoDB, Secrets Manager) widely. How do you balance convenience against cloud lock-in for a platform that may run on more than one cloud?Your company is choosing between Spring Cloud AWS, the plain AWS SDK v2 and higher-level managed integrations (for example event routing services) for connecting 200 Java services to AWS. What do you weigh at this scale?Spring Cloud project landscape
Name the main Spring Cloud projects in use today and the Netflix components they replaced: what replaced Ribbon, Hystrix and Zuul?After upgrading Spring Boot, the application fails at startup with an error mentioning 'Spring Boot [x] is not compatible with this Spring Cloud release train'. What is happening and how do you fix it?Spring Cloud grew in an era of VMs and Netflix OSS; Kubernetes, service meshes and managed cloud services now cover much of the same ground. How should your company decide which concerns belong in Spring Cloud libraries versus the platform?No question matches these choices.