31
[email protected] Teddy Chan CEO& Co-Founder

2015-11-05 AWS Tech Summits HK

Embed Size (px)

Citation preview

Page 1: 2015-11-05 AWS Tech Summits HK

[email protected]

Teddy Chan CEO& Co-Founder

Page 2: 2015-11-05 AWS Tech Summits HK

•  Who am I

•  What is AfterShip

•  How aftership scale

•  Share some examples

Page 3: 2015-11-05 AWS Tech Summits HK

Something about me

Page 4: 2015-11-05 AWS Tech Summits HK

Something about me

Page 5: 2015-11-05 AWS Tech Summits HK

Something about me

Page 6: 2015-11-05 AWS Tech Summits HK

Something about me

Page 7: 2015-11-05 AWS Tech Summits HK

Problem

Where is my order?

Page 8: 2015-11-05 AWS Tech Summits HK

Shipment tracking APISupporting 270+ 318 carriers

Page 9: 2015-11-05 AWS Tech Summits HK

<5 Team member Built everything

Page 10: 2015-11-05 AWS Tech Summits HK

That’s not right!

Page 11: 2015-11-05 AWS Tech Summits HK

What we want

We build product, not technology

KISS

Page 12: 2015-11-05 AWS Tech Summits HK

20+ Team member Built the product only

Page 13: 2015-11-05 AWS Tech Summits HK

Problem

AWS DNS failover

Page 14: 2015-11-05 AWS Tech Summits HK

Problem for nodejs

redis.lexxas.ng.0001.use1.cache.amazonaws.com

10.0.1.100Master

Page 15: 2015-11-05 AWS Tech Summits HK

Problem for nodejs

redis.lexxas.ng.0001.use1.cache.amazonaws.com

10.0.1.100Master

10.0.2.200Slave

Page 16: 2015-11-05 AWS Tech Summits HK

Problem for nodejs

redis.lexxas.ng.0001.use1.cache.amazonaws.com

10.0.1.100Master -> Slave

10.0.2.200Slave -> Master

Page 17: 2015-11-05 AWS Tech Summits HK

Problem for nodejs

redis.lexxas.ng.0001.use1.cache.amazonaws.com

10.0.1.100Master -> Slave

No DNS lookup again!

Page 18: 2015-11-05 AWS Tech Summits HK

Solution for nodejs

ioredis

https://github.com/luin/ioredis

2015 Sept 19

Page 19: 2015-11-05 AWS Tech Summits HK

Money is another problem

Page 20: 2015-11-05 AWS Tech Summits HK

80% cheaper

Page 21: 2015-11-05 AWS Tech Summits HK

-  On demand

-  Reserved

-  Spot

EC2 Instances Purchased Options

Page 22: 2015-11-05 AWS Tech Summits HK

EC2 Instances Purchased Options m3.large

http://calculator.s3.amazonaws.com/index.html

Op#on Hourly Discount

OnDemand 0.1330 --

1-yReserved 0.0810 39%off

3-yReserved 0.0520 61%off

Per Instance Prices & Projected Costs (all in USD)

Page 23: 2015-11-05 AWS Tech Summits HK

EC2 Instances Purchased Options m3.large

http://calculator.s3.amazonaws.com/index.html

Op#on Hourly Discount

OnDemand 0.1330 --

1-yReserved 0.0810 39%off

3-yReserved 0.0520 61%off

Spot 0.0165 88%off

Per Instance Prices & Projected Costs (all in USD)

Page 24: 2015-11-05 AWS Tech Summits HK

Spot Instance

-  Cheap, very cheap

-  Will be terminated at any time

-  Good for worker, non-long process

Page 25: 2015-11-05 AWS Tech Summits HK

How

Page 26: 2015-11-05 AWS Tech Summits HK

EC2 Instances Purchased Options

Page 27: 2015-11-05 AWS Tech Summits HK

Spot Instance

-  Almost suitable for all services

-  6th Jan 2015

- 

-  2 mins

https://aws.amazon.com/blogs/aws/new-ec2-spot-instance-termination-notices/

Page 28: 2015-11-05 AWS Tech Summits HK

Let’sshowyousth

28

Page 29: 2015-11-05 AWS Tech Summits HK

•  8 combination+ (zone + type)

•  Stateless application the best

•  Backend process need to

handle graceful shutdown

•  Double performance but ¼ of

original price

Page 30: 2015-11-05 AWS Tech Summits HK

OpenSource

hDps://github.com/aJership/

30

Page 31: 2015-11-05 AWS Tech Summits HK

[email protected]

http://www.slideshare.net/aftership

FAQ