In November 2015 we moved our Docker container architecture to Amazon ECS, and for the first time ever in December we were able to celebrate a new year in which our system could handle the huge number of requests without any crashes or interruptions—an accomplishment that we were extremely proud of.
Sebastian Herzberg System Engineer

mytaxi designed a microservice architecture on AWS using Docker containers that is fast and scales easily, to address extraordinary spikes in demand on days such as New Year's Eve. The company runs Europe's leading taxi app, connecting 10 million users with 45,000 taxis in 40 cities. The entire infrastructure is built on AWS, where services such as Amazon EC2 and Amazon ECS support mytaxi's Docker containers.

mytaxi is Europe's leading app for ordering taxis and was the first app of its kind worldwide when it was introduced in 2009. The app connects 10 million users with 45,000 taxis and allows them to book and pay for them in more than 40 cities and six countries, online or through the mytaxi mobile app. Passengers also have the option to rate their drivers, making it possible for other users to find the best taxis and drivers. The app was originally launched by the startup Intelligent Apps, but since 2014 has been 100 percent owned by the multinational automotive group Daimler.

Reliability is the highest priority for mytaxi, because often just one single poor experience can be enough to lose customers to a competitor. “Our service needs to be functional around the clock without interruptions,” explains Sebastian Herzberg, a systems engineer. “When customers are travelling late at night, they need to rely on the app to bring them home safely. We can't afford any downtime.” To achieve this level of service continuity, the company needs an elastic infrastructure that can scale enormously during times of massive demand. For example, on New Year's Eve, mytaxi's infrastructure—with 350 percent higher data traffic compared to a typical evening—is truly put to the test. “Exceptional situations present us with an exceptional challenge. The ability to scale up and cover these spikes is critical for our reputation,” says Sebastian Herzberg.

“With our application, which is not only user friendly for our customers but also easy for our developers to maintain and improve on, we want to be an innovative trailblazer in our industry. Costs also play an important role, because performance and the cost-performance ratio need to be just right. Furthermore, we need to work from a data center in Europe to maintain low latency and the strict data privacy criteria of our parent company Daimler.”

Originally mytaxi decided on Amazon Web Services (AWS) based on its growth-based scaling model. According to Herzberg, “Because we only had to pay for the resources we needed, and didn't have to invest several hundred thousand dollars upfront, our choice from the start was naturally AWS.” With emerging new technologies, mytaxi's infrastructure has developed further. The latest development is the migration to a microservices architecture on Docker containers.

mytaxi runs several Availability Zones (AZs) in the EU (Ireland) Region and uses Amazon Elastic Compute Cloud (Amazon EC2) Spot instances and Amazon EC2 Container Service (Amazon ECS) to support their Docker containers. “Because we are now part of Daimler, we must comply with exceptionally strict European data privacy criteria,” says Herzberg. “In other words, working in the EU, in Ireland, is perfect for us. We run approximately 40 Amazon EC2 instances, which are all part of various Amazon ECS clusters. Our primary infrastructure is distributed across approximately 50 microservices, where we use up to 10 Docker containers for each service.” By using Elastic Load Balancing mytaxi can ensure that the load is distributed across servers, while Amazon CloudWatch helps the team to monitor the load distribution.

The company uses Amazon Simple Storage Service (Amazon S3) as a repository, and the databases run on Amazon Relational Database Service (Amazon RDS), which allows for simple replications. All services access Amazon Simple Queue Service (Amazon SQS) and Amazon Simple Notification Service (Amazon SNS) as a message broker. To show passengers their taxi's precise current location in the app, mytaxi is now also on Amazon's IoT service.

For security reasons, mytaxi uses a Virtual Private Network connection to its AWS resources, which are a part of Amazon Virtual Private Cloud (Amazon VPC). The company also uses an AWS Support Business plan for quick, competent answers to specific technical questions or advice on new services.

Thanks to the migration to a Docker architecture and infrastructure development in the AWS Cloud, mytaxi's four-member devops team can ensure that the app's users receive reliable service all the time. “Customer satisfaction is our be all and end all,” notes Herzberg. “Our users expect continuous service; otherwise they'll simply look elsewhere. With AWS, our availability is fantastic. Consequently, because we work in several Availability Zones, we can maintain our availability and the service at a high level. The result is a great customer experience and a good night's rest for our team, because they're not woken up in the middle of the night to solve system problems.”

mytaxi has migrated its entire live environment to Spot instances, thus achieving high cost savings. “According to our estimates, our costs have decreased around 40 percent since we switched to Amazon EC2 Spot instances,” Herzberg says. A further change to the architecture was made possible by the migration to Amazon ECS. "We were able to isolate services from one another so that they wouldn't interfere with each other and would also consume fewer resources. This was the most significant step that we've taken with AWS," says Herzberg. "Furthermore, they can be scaled easily: We simply upload more containers when we need them.”

The mytaxi app is also now able to predict daily and weekly spikes. In addition, it has gained the elasticity required to meet demand during special events. Herzberg describes a typical situation on New Year's Eve: “Shortly before midnight everyone needs a taxi to get to parties, and after midnight people want to go home. In past years we couldn't keep up with the demand this generated, which was around three and a half times as high as normal. In November 2015 we moved our Docker container architecture to Amazon ECS, and for the first time ever in December we were able to celebrate a new year in which our system could handle the huge number of requests without any crashes or interruptions—an accomplishment that we were extremely proud of. We had faced the biggest night on the calendar without any downtime.”

An additional benefit is that the mytaxi developers save time and simultaneously increase their productivity with deployments that are three times faster than prior to using AWS. “With our new architecture we can deploy services within 10 minutes. Previously we needed at least 30 minutes,” says Herzberg. “With our microservice architecture built on AWS, we can provide new features to users faster than ever before.”