InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What Is Eureka? |
|
Answer» Eureka is the NETFLIX Service DISCOVERY Server and CLIENT. Eureka Server is using Spring Cloud. Eureka is the Netflix Service Discovery Server and Client. Eureka Server is using Spring Cloud. |
|
| 2. |
How To Achieve Server Side Load Balancing Using Spring Cloud? |
|
Answer» Server side load balancing can be achieved using Netflix Zuul. Zuul is a JVM based router and server side load balancing by Netflix. It provides a single entry to our system, which allows a browser, MOBILE app, or other user interface to consume services from multiple hosts WITHOUT managing cross-origin resource SHARING (CORS) and authentication for each one. We can integrate Zuul with other Netflix projects like Hystrix for fault tolerance and Eureka for service discovery, or use it to manage ROUTING rules, filters, and load balancing across your system. Server side load balancing can be achieved using Netflix Zuul. Zuul is a JVM based router and server side load balancing by Netflix. It provides a single entry to our system, which allows a browser, mobile app, or other user interface to consume services from multiple hosts without managing cross-origin resource sharing (CORS) and authentication for each one. We can integrate Zuul with other Netflix projects like Hystrix for fault tolerance and Eureka for service discovery, or use it to manage routing rules, filters, and load balancing across your system. |
|
| 3. |
How Do You Access A Restful Microservice? |
| Answer» | |
| 4. |
How Do You Setup Service Discovery? |
|
Answer» SPRING Cloud support SEVERAL ways to implement service discovery but for this I am GOING to use Eureka CREATED by Netflix. Spring Cloud provide several annotation to make it use EASY and hiding lots of complexity. Spring Cloud support several ways to implement service discovery but for this I am going to use Eureka created by Netflix. Spring Cloud provide several annotation to make it use easy and hiding lots of complexity. |
|
| 5. |
What Does One Mean By Service Registration And Discovery ? How Is It Implemented In Spring Cloud? |
|
Answer» When we START a project, we usually have all the configurations in the properties file. As more and more services are developed and deployed, adding and modifying these properties become more complex. Some services might go down, while some the location might change. This MANUAL CHANGING of properties may create issues. EUREKA Service Registration and Discovery helps in such scenarios. As all services are registered to the Eureka server and lookup DONE by calling the Eureka Server, any change in service locations need not be handled and is taken care of. When we start a project, we usually have all the configurations in the properties file. As more and more services are developed and deployed, adding and modifying these properties become more complex. Some services might go down, while some the location might change. This manual changing of properties may create issues. Eureka Service Registration and Discovery helps in such scenarios. As all services are registered to the Eureka server and lookup done by calling the Eureka Server, any change in service locations need not be handled and is taken care of. |
|
| 6. |
How Will You Monitor Multiple Microservices For Various Indicators Like Health? |
|
Answer» Spring Boot provides actuator endpoints to monitor metrics of individual microservices. These endpoints are very helpful for getting information about applications like if they are up, if their components like database etc are WORKING good. But a major drawback or difficulty about using actuator enpoints is that we have to individually hit the enpoints for applications to KNOW their status or health. Imagine microservices involving 50 applications, the admin will have to hit the actuator endpoints of all 50 applications. To help us DEAL with this situation, we will be using open source project located at Built on TOP of Spring Boot Actuator, it provides a web UI to enable us visualize the metrics of multiple applications. Spring Boot provides actuator endpoints to monitor metrics of individual microservices. These endpoints are very helpful for getting information about applications like if they are up, if their components like database etc are working good. But a major drawback or difficulty about using actuator enpoints is that we have to individually hit the enpoints for applications to know their status or health. Imagine microservices involving 50 applications, the admin will have to hit the actuator endpoints of all 50 applications. To help us deal with this situation, we will be using open source project located at Built on top of Spring Boot Actuator, it provides a web UI to enable us visualize the metrics of multiple applications. |
|
| 7. |
What Netflix Projects Did We Use? |
|
Answer» Eureka CREATED by Netflix, it is the Netflix Service DISCOVERY Server and Client. Netflix Ribbon, it PROVIDE SEVERAL algorithm for Client-Side LOAD Balancing. Spring provide smart RestTemplate for service discovery and load balancing by using @LoadBalanced annotation with RestTemplate instance. Eureka created by Netflix, it is the Netflix Service Discovery Server and Client. Netflix Ribbon, it provide several algorithm for Client-Side Load Balancing. Spring provide smart RestTemplate for service discovery and load balancing by using @LoadBalanced annotation with RestTemplate instance. |
|
| 8. |
What Are The Advantages And Disadvantages Of Microservices? |
|
Answer» Microservices Advantages
Microservices Disadvantages
Microservices Advantages Microservices Disadvantages |
|
| 9. |
What Is A Microservices Architecture? |
|
Answer» Microservices ARCHITECTURE allows to avoid monolith application for large system. It PROVIDE LOOSE coupling between COLLABORATING processes which running independently in different environments with tight cohesion. Microservices architecture allows to avoid monolith application for large system. It provide loose coupling between collaborating processes which running independently in different environments with tight cohesion. |
|
| 10. |
What Are The Advantages Of Using Spring Cloud? |
|
Answer» When developing distributed microservices with Spring Boot we face the following issues-
When developing distributed microservices with Spring Boot we face the following issues- |
|
| 11. |
What Is Spring Cloud? |
|
Answer» Spring Cloud Stream APP Starters are Spring Boot based Spring Integration applications that provide integration with external SYSTEMS. Spring Cloud Task. A short-lived microservices framework to QUICKLY BUILD applications that perform FINITE amounts of data processing. Spring Cloud Stream App Starters are Spring Boot based Spring Integration applications that provide integration with external systems. Spring Cloud Task. A short-lived microservices framework to quickly build applications that perform finite amounts of data processing. |
|
| 12. |
What Are Microservices? |
|
Answer» Microservices is a variant of the SERVICE-oriented architecture (SOA) ARCHITECTURAL style that structures an application as a collection of loosely coupled services. In a microservices architecture, services should be fine-grained and the PROTOCOLS should be lightweight. The benefit of decomposing an application into different smaller services is that it improves modularity and makes the application easier to UNDERSTAND, develop and test. It also parallelism development by enabling small autonomous teams to develop, deploy and scale their respective services independently. It also allows the architecture of an individual service to emerge through continuous refactoring. Microservices-based ARCHITECTURES enable continuous delivery and deployment. Microservices is a variant of the service-oriented architecture (SOA) architectural style that structures an application as a collection of loosely coupled services. In a microservices architecture, services should be fine-grained and the protocols should be lightweight. The benefit of decomposing an application into different smaller services is that it improves modularity and makes the application easier to understand, develop and test. It also parallelism development by enabling small autonomous teams to develop, deploy and scale their respective services independently. It also allows the architecture of an individual service to emerge through continuous refactoring. Microservices-based architectures enable continuous delivery and deployment. |
|