31 - idnog03 - bergas bimo branarto (gojek) - scaling gojek

25
Bergas Bimo Branarto Arlinda Juwitasari Rama Notowidigdo SCALING GOJEK

Upload: indonesia-network-operators-group

Post on 21-Apr-2017

1.089 views

Category:

Internet


5 download

TRANSCRIPT

Page 1: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Bergas Bimo BranartoArlinda JuwitasariRama Notowidigdo

SCALING GOJEK

Page 2: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

WHAT MAKES US WHO WE ARE

Page 3: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

SPEED INNOVATIONSOCIALIMPACT

OUR VALUES

Page 4: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Product Releases2011: go-ride, go-send, go-shop (all phone order)

January 2015: app release with go-ride, go-send, go-shop

April 2015: go-food

September 2015: go-mart

Okt 2015: go-box, go-massage, go-clean, go-glam, go-busway

Desember 2015: go-tix

Januari 2016: go-kilat (e-commerce partnership, not on app)

April 2016: go-car

Page 5: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

11,000,000 downloads in 15 months

0

3000000

6000000

9000000

12000000

January February March April May June July August MARCH

cumulative total app downloads

Page 6: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

JABODETABEK123.500 drivers

BANDUNG37,000 drivers

BALI11,200 drivers

surabaya23,000 drivers

MAKASSAR7,100 drivers

ARE WE?WHERE

PALEMBANG510 drivers

MEDAN440 drivers

BALIKPAPAN11,200 drivers

YOGYAKARTA690 drivers

SEMARANG370 drivers

Page 7: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

The Growth of Driver Gojek

400

800

1,200

1,600

10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7

Page 8: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

The Growth of Customer

100

200

300

400

500

1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6

Page 9: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

The growth of Order

350

700

1,050

1,400

1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6

number of order request multipliers

Page 10: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

CONWAY’S LAW

Any Organization that designs a system (defined broadly) will produce a design whose structure is a copy

of the organization’s communication structure

Page 11: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

SOCIAL

Monolithic

SOCIAL

Backend

Driver

Customer

Internal User

Page 12: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Issue :• Bugs• Unexpected Load growth• Long process time which resulted with server crash during peak

Challenge : - Small tech team (5 devs: for mobile apps (cust&driver), portals (3 different portals),

backend) vs 4 (or more) divisions- Keep server alive in unexpected high loads- So many features (and products) need to be released to keep business running

Page 13: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Transform 1backend - 1

Disk

backend - n

backend - 2proxy

Page 14: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Transform 1

Plus :

At least we’re still alive Minus:

Long process time

DB bottleneck

Page 15: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Transform 2

Diskproxy

service C

core backendcore backend

service C

service B

core backendcore backend

service B

service A

core backendservice A

service A

redis queue

Page 16: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Transform 2

Plus :

- Splitting functionalities to services makes code more efficient (at least for new services)

- Queue enables core backend to push and forget for one way communication

- Process time reduced- Enable throttling in queue workers

Minus:

• Process time still long enough for incoming traffic since it only split non-transactional functionalities

• DB bottleneck

Page 17: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Transform 3 Disk

proxy

service C

core backendcore backend

service C

redis queue

service B

core backendcore backend

service B

Disk

service A

core backendservice A

service A

Disk

rest api

service D

core backendcore backend

service D

Disk

rest api

redis cache

service E

core backendcore backend

service E

Disk

Page 18: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Transform 3

Plus :

- Split some transaction processes to another services: load splitted, process time reduced

- Redis cache: reduce db bottleneck- Each service owns their own db:

reduce db bottleneck

Minus:

• API calls in a flow of more than 2 services cause cascading failures

Page 19: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Transform 4 Disk

proxy

service C

core backendcore backend

service C

kafka queue

service B

core backendcore backend

service B

Disk

service A

core backendservice A

service A

Diskservice D

core backendcore backend

service D

Disk

inline redis cache

service E

core backendcore backend

service E

Disk

service F

core backendservice A

service F

Diskgrpc (http/2)

Page 20: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Transform 4Plus :

- Asynchronous communication between services via kafka: reduce api calls between services, reduces cascade failures

- Shared redis (inline) cache: reduce db queries, reduce api calls between services, reduce cascade failures

- grpc (uses http/2) should reduce network time

Minus:

?

Page 21: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Stack :• Java: Spring MVC and Spark• Go• Jruby on Rails• AngularJS• MySQL• PostgreSQL• MongoDB• Elasticsearch• Redis• Kafka• RabbitMQ

Page 22: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Response Time vs Throughput

25,000

50,000

75,000

100,000

0

400

800

1200

1600

4 5 6 7 8 9 10 11 12 1 2 3 4 5 6

response time (ms) throughput (rpm)

Page 23: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Order Growth vs Response Time

0

400

800

1,200

1,600

0

350

700

1,050

1,400

order response time (ms)

Page 24: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

Order Growth vs Throughput

0

25,000

50,000

75,000

100,000

0

350

700

1,050

1,400

order throughput (rpm)

Page 25: 31 - IDNOG03 - Bergas Bimo Branarto (GOJEK) - Scaling Gojek

TRUE HAPPINESS IS THE JOURNEY, NOT THE DESTINATION

THANK YOU