Subjects

All subjects Django Java Python React Spring Boot JavaScript PHP
Sign Up Free
Question 1 of 10 · Microservices with Spring Cloud
Interview question

What is a microservices architecture and how does Spring Boot support it? माइक्रोसर्विसेज़ आर्किटेक्चर क्या है और स्प्रिंग बूट इसे कैसे सपोर्ट करता है?

Answer

Microservices architecture structures an application as a collection of small, independently deployable services, each owning a single business capability and its own data store, communicating over the network via REST, messaging, or gRPC instead of in-process method calls the way a monolith would.

Spring Boot is well suited to microservices because each service can be an independently runnable, self-contained JAR with an embedded server, and the broader Spring Cloud ecosystem adds the cross-cutting concerns microservices need — service discovery (Eureka), centralized configuration (Config Server), routing (Gateway), resilience (Resilience4j), and distributed tracing — without which independent services would be hard to operate reliably at scale.

@SpringBootApplication
public class OrderServiceApplication {
    public static void main(String[] args) {
        SpringApplication.run(OrderServiceApplication.class, args);
    }
}

माइक्रोसर्विसेज़ आर्किटेक्चर किसी एप्लिकेशन को छोटी, स्वतंत्र रूप से डिप्लॉय होने वाली सर्विसेज़ के संग्रह के रूप में संरचित करता है, जहाँ हर सर्विस एक बिज़नेस क्षमता और अपना डेटा स्टोर रखती है, और REST, मैसेजिंग या gRPC के ज़रिए नेटवर्क पर संवाद करती है।

स्प्रिंग बूट माइक्रोसर्विसेज़ के लिए उपयुक्त है क्योंकि हर सर्विस एक स्वतंत्र रूप से चलने योग्य, स्वयं-निहित JAR हो सकती है, और व्यापक स्प्रिंग क्लाउड इकोसिस्टम क्रॉस-कटिंग चिंताएँ जोड़ता है — सर्विस डिस्कवरी (Eureka), केंद्रीकृत कॉन्फिगरेशन (Config Server), रूटिंग (Gateway), रेज़िलिएंस (Resilience4j) और डिस्ट्रिब्यूटेड ट्रेसिंग।

@SpringBootApplication
public class OrderServiceApplication {
    public static void main(String[] args) {
        SpringApplication.run(OrderServiceApplication.class, args);
    }
}

Was this answer clear?