Symfony

Microservices with Symfony

API Gateway, service discovery, distributed transactions, event-driven architecture, resilience patterns

22 preguntas de entrevista·
Senior
1

What is an API Gateway in a microservices architecture?

Respuesta

An API Gateway is a single entry point for all client requests to microservices. It acts as a reverse proxy that routes requests to appropriate services, handles authentication, rate limiting, caching and response aggregation. In the Symfony ecosystem, solutions like Kong, Traefik or custom implementations with Symfony can serve as a Gateway.

2

Which pattern allows managing distributed transactions across multiple microservices without global locking?

Respuesta

The Saga pattern manages distributed transactions by decomposing them into a sequence of local transactions. Each service executes its local transaction and publishes an event to trigger the next one. On failure, compensating transactions are executed to undo changes. This pattern avoids distributed locks and improves availability.

3

How does Symfony Messenger facilitate asynchronous communication between microservices?

Respuesta

Symfony Messenger allows sending messages to external transports like RabbitMQ, Amazon SQS or Redis. Each microservice can publish messages to a bus and other services consume them asynchronously. Messages are serialized (JSON, Protobuf) and can cross service boundaries, enabling loose coupling.

4

What is the Circuit Breaker pattern and how to implement it with Symfony?

5

What is the main advantage of the Database per Service pattern in a microservices architecture?

+19 preguntas de entrevista

Domina Symfony para tu próxima entrevista

Accede a todas las preguntas, flashcards, tests técnicos, ejercicios de code review y simuladores de entrevista.

Empieza gratis