Can you tell more about transitioning to an asynchronous model? What was before, what changed? What microservices were involved?
sobes.tech AI
Answer from AI
Previously, our system used a synchronous request processing model: the client sent a request, the server processed it and returned a response, blocking the thread until the operation was complete. This led to scalability issues and delays under high load, especially when working with external APIs and databases.
Switching to an asynchronous model allowed processing requests in a non-blocking manner, using CompletableFuture and reactive libraries (such as Project Reactor or RxJava). Now, the server can initiate multiple operations in parallel and return the result when all are completed, significantly increasing throughput and system responsiveness.
The architecture introduced microservices, divided by business functions:
- Authentication and authorization service
- User management service
- Order processing service
- Notification service
Each microservice interacts through asynchronous messages (e.g., via Kafka or RabbitMQ), reducing coupling and increasing fault tolerance. This approach made it easier to scale individual components and faster to implement new features.