(mbl304) building scalable mobile services with global footprints | aws re:invent 2014
DESCRIPTION
In this session, hear directly from HTC and EasyTaxi, who share their architecture stories of how they built powerful mobile backend services on AWS. Learn how HTC built a news aggregation service (BlinkFeed), a photo-sharing service (HTC Share), and a phone backup service (HTC Backup) on AWS. Also learn how they used AWS for deploying server code, provisioning handsets, and business intelligence, and how they launched these services worldwide, with high availability and low latency in just 6 months. EasyTaxi is building the world's largest taxi mobile app. EasyTaxi shares their experience building an app as they scaled to 35+ countries and thousands of transactions per second. They discuss how they had to reinvent their architecture and infrastructure to meet several cultural as well technical challenges such as adapting to different kinds of access, mobile networks, and working with different charsets to change server locations. They share best practices on how they met the demanding traffic and transactional workloads by building on AWS and leveraging help from Amazon Enterprise Support.TRANSCRIPT
Jan Metzner, Solutions Architect, AWS Germany
Vinícius Gracia, Founder & CTO, Easy Taxi
Suresh Rasaretnam, Architect, HTC
Amazon EC2
Auto Scaling
Elastic Load Balancing
Amazon Route 53
Latency-based routing
Amazon CloudFront
static/dynamic content
AWS already has everything you need
Amazon Cognito
(Identity Broker)
AWS IAM
Amazon Cognito (Sync)
Amazon DynamoDB
Amazon S3
Amazon Mobile Analytics
Amazon Kinesis
Amazon Redshift
Amazon CloudSearch
Amazon SNS
Amazon SQS
Amazon Mobile Analytics
Amazon Cognito
Amazon Mobile Analytics
Sync
Identity
Amazon Cognito
Amazon Mobile Analytics
Sync
Identity
Amazon DynamoDBShared Data
Amazon S3Media
Amazon CloudSearchSearch
Amazon Cognito
Amazon Mobile Analytics
Sync
Identity
Amazon DynamoDBShared Data
Amazon S3Media
Backend Calls
Custom
Backend
Amazon EC2
Amazon CloudSearchSearch
Amazon SQSELB
Amazon Cognito
Amazon Mobile Analytics
Sync
Identity
Amazon DynamoDBShared Data
Amazon S3Media
Backend Calls
Amazon CloudSearchSearch
Amazon SQS
Amazon Redshift
Amazon SNSBI
Custom
Backend
Amazon EC2
Amazon Cognito
provider = new CognitoCredentialsProvider(context, AWS_ACCOUNT_ID, COGNITO_POOL_ID, COGNTIO_ROLE_UNAUTH, COGNITO_ROLE_AUTH);… not only to SQS – you can access all shared services
Session.openActiveSessionFromCache(LoginActivity.this);client = new AmazonSQSClient(provider);client.sendMessage("https://sqs.eu-west-1.amazonaws.com/1234567890/myqueue", "message");logins = new HashMap<String, String>();put("graph.facebook.com", token);provider.setLogins(logins);
Saudi Arabia
Brazil
Argentina
Peru
Mexico
Venezuela
Colombia
Ecuador
S. Africa
Namibia
Angola
Botswana
Kenya
Tanzania
Morocco
Tunisia
Nigeria
Ghana
Ivory C.
Algeria
Hong Kong
Taiwan
Indonesia
Malaysia
Philippines
Singapore
Thailand
Vietnam
Present
Coming soon
Bolivia
Uruguay
Puerto
Rico
Panama
Costa Rica
Guatemala UAE
Jordan
Chile
IndiaEgypt
PakistanS. Korea
“Everybody has a plan until they get punched in the face.”
-Mike Tyson
• Elastic Load Balancing to take care of all our https handling and
also to distribute the traffic through all our APIs instances
• AWS CloudFormation to deploy an environment as fast as needed
• Amazon S3 to store driver documents and other files; the ones
available online are cached using Amazon CloudFront
• Amazon CloudSearch to do text searches on huge datasets
• Amazon RDS MySql and MongoDB for data storage
• Amazon SQS for queued services
This services allows Easy Taxi to focus on delivering innovation to
costumers while AWS takes care of the heavy lifting
to manage a large
amount of calls and to add them on a queue
service that is persistent for 24 hours
With AWS services we can implement all this in
just a few clicks (fast and easy), it’s just a
matter of choosing the best ones for us
• AWS enterprise support gives us access to
experts who help us choose the best
services and solutions for our challenges
• AWS providing us with multiple regions and
Availability Zones is key to our success
• Without AWS it would be nearly impossible to
scale as much and as fast as we need toAvailability Zone Availability Zone
API API API… API API API…
Mongo Mongo
DOWNLOAD OUR APP WEBSITE & SOCIAL
easytaxi.comfacebook.com/easytaxibrtwitter.com/easytaxi
CAREERS
We are always looking for talent, esspecially in IT!
Who is HTC-Creative Labs?
• OEM Manufacture
– HTC-branded mobile devices
– Headquarters in Taipei, Taiwan
– Services arm of HTC
• (Blinkfeed, Zoe, HTC Backup)
Services built on AWS
• Started in 2010
• 90% of our services are built on AWS
• Current plan is to stay on AWS
• We love AWS! – Uptime, Support, Innovation, Global
Footprint, and of course scalability
HTC is growing
• End-user services
• Apps
• China/Global
• Developers
All about uptime
• Data in every DC
• Mobile-friendly API
– BI
– Service-specific
• Screen-specific APIs
• Background syncAuto-Scaling Group: "Federated Search" Tier
Federated Search Cluster
Elastic Search Cluster
Initial RequestsRefresh RequestsCatalog requestsImage Requests
News Service Deployment.
US REGION
Auto-Scaling Group: "Federated Search" Tier
Federated Search Cluster
Elastic Search Cluster
Region #1- EU 1a
DBMaster
Image Srv
Crawler
DBSlave
Auto-Scaling Group: "RS/IS" Tier
Elastic Load Balancer
RS/IS Cluster
Elastic Load Balancer
EU REGION
Bundles X8Region #1- US East 1a
DBMaster
Client Read Logs
Image Srv
Crawler
Traffic is routed to nearest DC
based on locationLog playback
DBSlave
Auto-Scaling Group: "RS/IS" Tier
Elastic Load Balancer
RS/IS Cluster
Search
Elastic Load Balancer
Read Count, Event Promotion,Bundles
Auto-Scaling Group: "Read Count" Tier
App Server App Server N+1
Elastic Load Balancer
Scaling
• Device Provision– Datacenters
– Timeouts
– Dev/test/stage
• Global DNS - Route 53 (Anycast/WRR)– Lookup time: 0.269 Lookup time: 0.132
Launched vs. Deleted Instances
Log’s Logs Logs
• AWS CloudTrail
– Sumologic
– Tags
– Security
– Interdepartmental
• Billing
What’s next
• Amazon SNS – Push vs. Pull
– Breaking news
– Location-based content
• Amazon Cognito and Blinkfeed
• Trial vs. Registered users
• Sync categories across multiple devices.
• OpenID connect – integration with existing ID systems.
http://bit.ly/awsevals