Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
PHP Experience 2016 - IT Master
First 90Scaling
With
Microservice
This is our vision
Building the foundation to Build a 3B Company by FY20
Agenda
+ What we call Microservices ?
+ Benefit a...
Microservices
is a new "tag" for
things we are already
doing.
This is our vision
Building the foundation to Build a 3B Company by FY20
Vs
Monolithic vs Microservices
A Tiny Definition of
Microservices
Small Autonomous services
communicating with each other
using language-agnostic APIs.
+ Different languages, databases, hardware ...
+ Each service can be deployed independently
+ The services are easy to rep...
+ Operations Overhead
+ Avoid Nanoservice
+ Implicit Interfaces
+ Network communication
Challenge
Scaling
in
MercadoLivre
“Scalability Porn”
18.000.000 Request per minutes
400 Deploys per days
700 Developers in 6 development centers
20.000 Virt...
Microservices - API MercadoLibre
Services Communicate -> HTTP/REST with JSON
API Gateway -> NGINX
NGINX
User Service
Item ...
Lessons
learned
Cache everything
Reuse HTTP headers
GET https://api.mercadolibre.com/sites/MLB
HTTP/1.1 200 OK
Cache-Control: max-age=60, ...
200 & 206 Partial Content
Designed to worst-case
VIP
User Service
Reputation
Service
User Service
Reputation
Service
VIP
Online GET vs Background update
Resources with few changes and many outbuildings
User Service
Item Service
Categories Serv...
Duplicate Data
Each department can have a copy of the data
POST Item
Item Service
Search Service
Moderation Service
Queue ...
Thank
You
?
PHP Experience 2016 - [Palestra] Scaling with Microservice
PHP Experience 2016 - [Palestra] Scaling with Microservice
Upcoming SlideShare
Loading in …5
×

PHP Experience 2016 - [Palestra] Scaling with Microservice

433 views

Published on

Pablo Moretti, Product Development Manager no Mercado Libre Argentina, fez a palestra "Scaling with Microservice", no PHP Experience 2016.

O iMasters PHP Experience 2016 aconteceu nos dias 21 e 22 de Março de 2015, no Hotel Tivoli em São Paulo-SP
http://phpexperience2016.imasters.com.br/

Published in: Education
  • Be the first to comment

  • Be the first to like this

PHP Experience 2016 - [Palestra] Scaling with Microservice

  1. 1. PHP Experience 2016 - IT Master First 90Scaling With Microservice
  2. 2. This is our vision Building the foundation to Build a 3B Company by FY20 Agenda + What we call Microservices ? + Benefit and Challenge + Scaling in MercadoLivre + Lessons Learned
  3. 3. Microservices is a new "tag" for things we are already doing.
  4. 4. This is our vision Building the foundation to Build a 3B Company by FY20 Vs Monolithic vs Microservices
  5. 5. A Tiny Definition of Microservices Small Autonomous services communicating with each other using language-agnostic APIs.
  6. 6. + Different languages, databases, hardware ... + Each service can be deployed independently + The services are easy to replace + Improved fault isolation Benefit
  7. 7. + Operations Overhead + Avoid Nanoservice + Implicit Interfaces + Network communication Challenge
  8. 8. Scaling in MercadoLivre
  9. 9. “Scalability Porn” 18.000.000 Request per minutes 400 Deploys per days 700 Developers in 6 development centers 20.000 Virtual servers 1.500 Physical servers
  10. 10. Microservices - API MercadoLibre Services Communicate -> HTTP/REST with JSON API Gateway -> NGINX NGINX User Service Item Service Categories Service
  11. 11. Lessons learned
  12. 12. Cache everything Reuse HTTP headers GET https://api.mercadolibre.com/sites/MLB HTTP/1.1 200 OK Cache-Control: max-age=60, stale-while-revalidate=240 {........}
  13. 13. 200 & 206 Partial Content Designed to worst-case VIP User Service Reputation Service User Service Reputation Service VIP
  14. 14. Online GET vs Background update Resources with few changes and many outbuildings User Service Item Service Categories Services Search Service - Dump all categories - Update each 10 minutes
  15. 15. Duplicate Data Each department can have a copy of the data POST Item Item Service Search Service Moderation Service Queue Service Item DB Item DB (partial copy) Item DB (partial copy)
  16. 16. Thank You
  17. 17. ?

×