Stretching the cloud to its limits

For our client Teva, we developed a highly scalable cloud solution that had very strict requirements on performance and availability. It was developed on Microsoft Azure platform, mainly using Cloud Services.

Application is very CPU intensive because every user request results in a lot of calculations and processing. Add high usage peaks that can occur to this already CPU intensive application that has strict performance requirements, system architecture design becomes a very challenging problem.

Azure SQL Database was used for a data storage, but because of a performance goals, we weren’t able to access the database directly. To make system as fast as possible everything was cached using the Azure Redis Cache and all writing was done asynchronously. All the calculations that can be postponed are delegated to Azure Worker roles. Cache and asynchronous writing to the database introduced a new challenges such as maintaining data integrity in case of system failures.

Lots of calculations generate a lot of data that exceeds size limit on Azure SQL Database instance. To overcome this, we used Azure SQL Federations with lots of smaller Federation members. Luckily, we were not the only ones with those issues, so Microsoft released SQL Database Premium which enabled us to leave Federations and have great performance without any vertical sharding.

System also uses Azure Web Site for diagnostics portal, Azure Table Storage for log storage and Access Control Service for integration with an on premise Active Directory.

Lessons learned

Years of work on this project gave us a great insight into Azure. We learned all its bits and pieces, talked about it on conferences and wrote a lot of blog posts.