Introduction to Spring Boot Microservices: Service Discovery and Load Balancing
A beginner's quiz on the fundamentals of service discovery and load balancing in Spring Boot microservices.
Questions in this quiz
15 questions on Introduction to Spring Boot Microservices: Service Discovery and Load Balancing. Work through them here, then start the quiz to answer them and see your score.
1.What is the primary purpose of service discovery in microservices?
- ATo store application data
- BTo secure microservices
- CTo locate microservices instances dynamically
- DTo balance the load among servers
2.Which tool is commonly used for service discovery in Spring Boot microservices?
- AEureka
- BRabbitMQ
- CKafka
- DRedis
3.In a Spring Boot application, what annotation is used to enable Eureka client?
- A@EnableEurekaClient
- B@SpringBootApplication
- C@EnableFeignClients
- D@EnableDiscoveryClient
4.What is the role of a load balancer in microservices architecture?
- ATo manage database connections
- BTo store configuration settings
- CTo distribute incoming requests across multiple instances
- DTo provide security
5.Which Spring Cloud component provides client-side load balancing?
- ARibbon
- BConfig Server
- CZuul
- DHystrix
6.What is the default load balancing strategy used by Ribbon?
- AWeighted Response Time
- BLeast Connections
- CRandom
- DRound Robin
7.Which annotation is used to enable Ribbon in a Spring Boot application?
- A@EnableRibbon
- B@EnableLoadBalancing
- C@RibbonClient
- D@EnableCircuitBreaker
8.What is the primary benefit of using service discovery in microservices?
- ADynamic service registration and discovery
- BFaster data processing
- CAutomatic scaling
- DImproved security
9.Which of the following is NOT a feature of Eureka?
- AService health checks
- BService discovery
- CService registration
- DLoad balancing
10.What is the purpose of the @LoadBalanced annotation in Spring Boot?
- ATo secure endpoints
- BTo manage application properties
- CTo configure database connections
- DTo enable load balancing for RestTemplate
11.How does Ribbon determine which instance to send a request to?
- ARandomly
- BBy checking the instance's CPU usage
- CBased on a predefined algorithm
- DBy instance's memory usage
12.What is a key advantage of using client-side load balancing?
- AReduced latency
- BImproved security
- CSimplified configuration
- DCentralized control
13.Which configuration file is typically used to set up Eureka in a Spring Boot application?
- Aapplication.properties
- Bbootstrap.xml
- Cconfig.json
- Deureka.yml
14.What happens if a service instance fails in a microservices architecture with service discovery?
- AThe service is restarted automatically
- BThe service is automatically deregistered
- CRequests are queued
- DThe entire application crashes
15.Which component in Spring Cloud can be used as an API gateway?
- AEureka
- BRibbon
- CZuul
- DHystrix