Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The Rocky Road from Monolithic to Microservice...
Search
cnu
November 25, 2017
Programming
1.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
The Rocky Road from Monolithic to Microservices Architecture
The explanation of our Microservices architecture and the lessons we learnt from it.
cnu
November 25, 2017
More Decks by cnu
See All by cnu
Redisconf 2018: Probabilistic Data Structures
cnu
1
1.1k
Probabilistic Data Structures
cnu
0
760
AWS Lambda - Pycon India 2016
cnu
0
630
ZeroMQ - PyCon India 2013
cnu
2
1.6k
Other Decks in Programming
See All in Programming
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
270
はてなアカウント基盤 State of the Union
cockscomb
1
1.2k
AI がコードを書く時代における新卒エンジニアの仕事風景 (2026) / New Graduate Engineers in the Era of AI Coding (2026)
sushichan044
0
120
Agentic UI
manfredsteyer
PRO
0
210
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
160
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.5k
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.1k
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
190
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.7k
Webフレームワークの ベンチマークについて
yusukebe
0
190
The NotImplementedError Problem in Ruby
koic
1
1k
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
7.1k
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
Making Projects Easy
brettharned
120
6.7k
Building the Perfect Custom Keyboard
takai
2
810
Thoughts on Productivity
jonyablonski
76
5.2k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
How GitHub (no longer) Works
holman
316
150k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
550
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Google's AI Overviews - The New Search
badams
0
1.1k
BBQ
matthewcrist
89
10k
Transcript
THE ROCKY ROAD FROM MONOLITHIC TO MICROSERVICES ARCHITECTURE
THE ROCKY ROAD FROM MONOLITHIC TO MICROSERVICES ARCHITECTURE
SRINIVASAN RANGARAJAN Head of Product Engineering
SRINIVASAN RANGARAJAN https://cnu.name Twitter: @cnu Github: @cnu
RETAIL AUTOMATION PRODUCT
Catalog & User Events Processing Recommendation
MONOLITHIC ARCHITECTURE
MONOLITHIC ARCHITECTURE Image Processing API Image Searcher File Storage
MINIMUM TWO SERVERS BEHIND ELB Load Balancer
CLOUD VS BARE METAL
EXPENSIVE
NOT REALTIME
NOT PERSONALIZABLE
API Data Store Ingestion Image Processing Image Searcher User Event
Personalization Engine
GOTHAM
API Data Store Ingestion Image Processing Image Searcher User Event
Personalization Engine
JOKER • Convert client’s catalog into one common MAD Format
• Normalization of fields and metadata • Can process batch and streaming data • Major cause of chaos in the system
GORDON • Routes the product metadata to the right micro
services • Is it a new product? or update to an existing product? • Streaming data from AWS SQS
WONDER WOMAN • Not a microservice, But a tool used
to generate rules for the catalog • Rules are send to the Image Processing microservice • Works on Samples of data and not entire dataset
WATCHTOWER • Central Source of Truth for all metadata •
Backed by an RDBMS Database (Postgresql) • Input via SQS and REST API • Output via REST API
INGESTION Gordon Joker Joker Joker Wonder Woman Watchtower Next Stage
API Data Store Ingestion Image Processing Image Searcher User Event
Personalization Engine
NIGHTWING • Computer Vision and Deep Learning Models • Convert
Image to high dimensional vectors • Tag image with visual attributes • Computer Intensive
API Data Store Ingestion Image Processing Image Searcher User Event
Personalization Engine
BATMAN • Custom very fast Vector Indexer and Search Engine
• Stores everything in memory • Two sub-parts: Indexer and Searcher • Store binary information about image in DynamoDB
API Data Store Ingestion Image Processing Image Searcher User Event
Personalization Engine
SUPERMAN • User behaviour based recommendation • Multiple products like
Collaborative filtering, Cross Product recommendation • Records every user event data and stores in a data warehouse
TWO FACE • Individual User level Personalization • Shows a
different “face” to each user • Dynamic and realtime
API Data Store Ingestion Image Processing Image Searcher User Event
Personalization Engine
FLASH • Very fast data structure storage - redis instance
• User session level history, Product Availability, etc. • Fast access, but non- expirable
GCPD • “Global Cache for Products Digested” • Rough first
level of cache for the results
API Data Store Ingestion Image Processing Image Searcher User Event
Personalization Engine
ROBIN • API Gateway for all our products • Combines
data from other micro services like Batman, Two Face, Watchtower, Superman, etc and returns JSON Response
API Data Store Ingestion Image Processing Image Searcher User Event
Personalization Engine Joker, Gordon, Wonder Woman Nightwing Batman Robin Watchtower, GCPD, Flash Superman, Two Face
LESSONS WE LEARNT
START WITH A MONOLITH. CHIP OFF PIECES AND BUILD THE
MICROSERVICES. Lesson 0
–Melvin Conway “… organizations which design systems ... are constrained
to produce designs which are copies of the communication structures of these organizations."
DEPLOY HETEROGENOUS MICROSERVICES IN A SINGLE SERVER Lesson 1
Compute Optimized Server Memory Optimized Server Nightwing Batman Robin Robin
Robin Joker Joker Joker Gordon Watch tower Watch tower Joker
IMMUTABLE MICROSERVICES Lesson 2
Constable Inspector Assistant Commissioner Commissioner
ASYNCHRONOUS IS BETTER THAN SYNCHRONOUS Lesson 3
None
NOT ALL MICROSERVICES NEED TO BE SERVERS Lesson 4
ADD REQUEST ID OR TRANSACTION ID TO DEBUG EASILY Lesson
5
GIVE A CHARACTER TO YOUR MICROSERVICES Lesson 6
None
THANK YOU
http://cnu.name/talks/ @cnu