Java Spring Boot & Microservices Interview Questions Set - 5

0 Views
Published
Q41. Explain few main features of Microservices?

Few main features of microservices like services within a system are largely decoupled. So, the application can be easily built, altered, and scaled. Continuous delivery allows frequent releases of software, through systematic automation of software creation, testing, and approval. Microservices do not focus on applications as projects. Instead, they treat applications as products for which they are responsible

Q42. What are the most significant benefits of using microservices?

The most significant benefit of using microservices is that it builds an application to collect small autonomous services developed for a business domain. So, if the business needs to change constantly, the development teams can rapidly build new apps components to meet the requirement. Each microservice runs a unique process and communicates through a well-defined, lightweight mechanism, such as a container, to serve a business goal.

Q43. How does a Microservice architecture work?

The Microservice architecture of an application can be simplified into multiple modules that independently perform the single precise standalone task. Each application module is an independent service/process that can be replaced, updated, or deleted without disrupting the rest of the application. Under microservice architecture, an application can grow along with its requirements.

Q44. How many ways we can deploy Microservices Application.?

Microservices Application can be deployed with Serverless Deployment, it packages the service as a ZIP file and uploads it to the Lambda function. The Lambda function is a stateless service that automatically runs enough micro-services to handle all requests. And another way with Multiple Service Instance per Host, it is used to run single or multiple service instances of the application on a single or multiple physical/virtual host


Q45. Explain difference between SOA and the Microservices Architecture?

SOA stands for Service Oriented Architecture. It is a collection of services used to communicate with each other through simple data passing or activity coordination. On the other hand, the Microservices Architecture is a collection of small functional modules that are independently deployable, scalable, target specific business goals, and communicate over standard protocols.

Q46. What are the few challenges while working Microservice Architectures?

Developing several smaller microservices sounds easy, but the challenges often faced while developing them are Automate the Components is difficult to automate because there are several smaller components. So, for each component we must follow the stages of Build, Deploy and, Monitor. Debugging is difficult to find out each service for an error. It is essential to maintain centralized logging and dashboards to debug problems.

Q47. What are the other challenges while working Microservice Architectures?

Other challenges are Perceptibility in maintaining many components together becomes difficult to deploy, maintain, monitor and identify problems. It requires great perceptibility around all the components. Configuration Management for the components across the various environments becomes tough sometimes.

Q48. What are the types of tests used in Microservices?

Tests used in Microservice architecture into three main categories as the top-level tests are used to conduct acceptance tests, mostly fewer in numbers. These types of tests make stakeholders know about different software features, the middle-level tests are used to perform exploratory tests such as the stress test and usability test and the bottom-level tests perform general tests such as performance tests and unit tests. These kinds of tests are entirely automated

Q49. How to implement security in Microservices Application.?

Security in Microservices application can be implemented either using OAuth2 or JWT. Develop a Spring Boot Application to expose a Simple REST GET API with request URL mapping. Configure Spring Security for JWT, Expose REST POST API with authentication URL mapping using which User will get a valid JSON Web Token And then allow the user access to the API with request only if it has a valid token.

Q50. When to use Microservice Architecture.?

Microservice Architecture can be best option When you want your monolithic application to accommodate scalability, agility, manageability and delivery speed. When you have standalone business applications or modules that have to be reused across diverse channels and some good examples would be login services, search options, authentication facilities and if you are building a highly agile application (product or service) that demands swift speed of delivery, innovation, etc.
Category
Job
Be the first to comment