33
Jan Metzner, Solutions Architect, AWS Germany Vinícius Gracia, Founder & CTO, Easy Taxi Suresh Rasaretnam, Architect, HTC

(MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

Embed Size (px)

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.

Citation preview

Page 1: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

Jan Metzner, Solutions Architect, AWS Germany

Vinícius Gracia, Founder & CTO, Easy Taxi

Suresh Rasaretnam, Architect, HTC

Page 2: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014
Page 3: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014
Page 4: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

Amazon EC2

Auto Scaling

Elastic Load Balancing

Page 5: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014
Page 6: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

Amazon Route 53

Latency-based routing

Amazon CloudFront

static/dynamic content

Page 7: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014
Page 8: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

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

Page 9: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

Amazon Cognito

Amazon Mobile Analytics

Sync

Identity

Page 10: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

Amazon Cognito

Amazon Mobile Analytics

Sync

Identity

Amazon DynamoDBShared Data

Amazon S3Media

Amazon CloudSearchSearch

Page 11: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

Amazon Cognito

Amazon Mobile Analytics

Sync

Identity

Amazon DynamoDBShared Data

Amazon S3Media

Backend Calls

Custom

Backend

Amazon EC2

Amazon CloudSearchSearch

Amazon SQSELB

Page 12: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

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

Page 13: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

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);

Page 14: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014
Page 15: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

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

Page 16: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

“Everybody has a plan until they get punched in the face.”

-Mike Tyson

Page 17: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014
Page 18: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014
Page 19: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

• 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

Page 20: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

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

Page 21: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

• 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

Page 22: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

DOWNLOAD OUR APP WEBSITE & SOCIAL

easytaxi.comfacebook.com/easytaxibrtwitter.com/easytaxi

CAREERS

[email protected]

We are always looking for talent, esspecially in IT!

Page 23: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014
Page 24: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

Who is HTC-Creative Labs?

• OEM Manufacture

– HTC-branded mobile devices

– Headquarters in Taipei, Taiwan

– Services arm of HTC

• (Blinkfeed, Zoe, HTC Backup)

Page 25: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

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

Page 26: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

HTC is growing

• End-user services

• Apps

• China/Global

• Developers

Page 27: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

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

Page 28: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

Scaling

• Device Provision– Datacenters

– Timeouts

– Dev/test/stage

• Global DNS - Route 53 (Anycast/WRR)– Lookup time: 0.269 Lookup time: 0.132

Page 29: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

Launched vs. Deleted Instances

Log’s Logs Logs

• AWS CloudTrail

– Sumologic

– Tags

– Security

– Interdepartmental

• Billing

Page 30: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

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.

Page 31: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014
Page 32: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014
Page 33: (MBL304) Building Scalable Mobile Services with Global Footprints | AWS re:Invent 2014

http://bit.ly/awsevals