Go

Microservices

Service architecture, discovery, communication, API gateway, circuit breaker, observability, structured logging, metrics, distributed tracing

24 면접 질문·
Senior
1

What is the main difference between monolithic and microservices architecture?

답변

In microservices architecture, the application is decomposed into independent services that can be developed, deployed and scaled separately, unlike monoliths where all code is in a single process. Each microservice has its own database and communicates via APIs. This enables better scalability, resilience and technology flexibility, but introduces increased operational complexity.

2

What is the main role of service discovery in microservices architecture?

답변

Service discovery enables services to locate each other dynamically without hardcoded configuration. Services register with a registry (Consul, etcd, Eureka) with their IP address and port. Clients query the registry to get available instances. This facilitates horizontal scaling, continuous deployment and resilience in case of instance failure.

3

In microservices architecture, which pattern manages distributed data consistency without ACID transactions?

답변

The Saga pattern manages distributed data consistency via a sequence of local transactions. Each service executes its transaction and publishes an event. If a step fails, compensating transactions undo previous changes. Implementations can be orchestrated (central coordinator) or choreographed (pub/sub events). This guarantees eventual consistency without distributed locks.

4

Which Go library is commonly used to implement service discovery with Consul?

5

What is the main difference between synchronous (REST/gRPC) and asynchronous (messaging) communication between microservices?

+21 면접 질문

다음 면접을 위해 Go을 마스터하세요

모든 질문, flashcards, 기술 테스트, 코드 리뷰 연습, 면접 시뮬레이터에 접근하세요.

무료로 시작하기