The initial solution was built using Spring Boot, and a distributed cache like Redis was considered. This approach lacked a communication mechanism between servers without introducing an external message queue, breaching compliance with many global and EU protocols and regulations. The team determined an encrypted inter-server communication without external components such as a distributed cache was the right path.
Akka provided a platform for building a distributed system that provides resilience and performance, and didn’t require complex configuration. Akka enables embedding the inter-service messaging for cache invalidation and session partitioning directly into its Java application code, thus eliminating the need for a cache and external message queue resources. The simple setup enabled their two-person team to build a redundant and scalable system with just application servers and a database—in only 3 months.
Key features for the Doctolib team included:
- Low latency via sharding and pub/sub messaging: Over a million healthcare professionals, including doctors, nurses, and admins, requires the delivery of millions of messages daily. Akka sharding and publish/subscribe (Pub/Sub) messaging automatically shards events over different servers, and simple pub/sub messaging with local server caching provides instant event notifications.
- Ease of deployment and ongoing management: Akka handles the back end, enabling the two-person team to build the system in three months and continue to manage the entire system while incorporating new features.
- Clustering: New users and more servers are able to be added easily.
- Replication: Akka also immediately offered the team redundancy across multiple servers.