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
Microservices architecture pitfalls
Search
Mateusz Gajewski
March 07, 2015
Programming
1
210
Microservices architecture pitfalls
This is the talk about common pitfalls met while building scalable microservice architecture
Mateusz Gajewski
March 07, 2015
Tweet
Share
More Decks by Mateusz Gajewski
See All by Mateusz Gajewski
Modern java for decade-old problems
wendigo
0
120
3 kroki do tyłu, 2 lata w przód
wendigo
2
170
JDD - Dług techniczny
wendigo
2
1.1k
WJUG 2017: 4 lata rewolucji mikrousługowej w Allegro
wendigo
0
330
4 lata rewolucji mikrousługowej w Allegro
wendigo
2
790
Project Rubicon
wendigo
0
350
RxJava - Reactive extensions for the JVM
wendigo
1
280
Building distributed systems with OSS
wendigo
1
150
Scaling infrastructure beyond containers
wendigo
1
150
Other Decks in Programming
See All in Programming
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
110
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
120
SwiftUIで単方向アーキテクチャを導入して得られた成果
takuyaosawa
0
270
一休.com のログイン体験を支える技術 〜Web Components x Vue.js 活用事例と最適化について〜
atsumim
0
510
ARA Ansible for the teams
kksat
0
150
ソフトウェアエンジニアの成長
masuda220
PRO
10
1.3k
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
110
さいきょうのレイヤードアーキテクチャについて考えてみた
yahiru
3
750
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
220
楽しく向き合う例外対応
okutsu
0
130
時計仕掛けのCompose
mkeeda
1
300
仕様変更に耐えるための"今の"DRY原則を考える / Rethinking the "Don't repeat yourself" for resilience to specification changes
mkmk884
0
240
Featured
See All Featured
Become a Pro
speakerdeck
PRO
26
5.1k
How GitHub (no longer) Works
holman
314
140k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
How to train your dragon (web standard)
notwaldorf
91
5.8k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Navigating Team Friction
lara
183
15k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
Designing for Performance
lara
604
68k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
100
18k
Transcript
Microservices architecture pitfalls WJUG meeting ◦ march 2015 Mateusz Gajewski
Solutions Architect @ Allegro Twitter: @wendigo
About me given: I started working in Allegro in 2009
(5 mln AO, 50 devs) when: Allegro reached 40 mln AO, 400 devs then: I am Solutions Architect 2
Agenda • Microservices, microservices, microservices! ;) • Some challenges &
pitfalls: • Architectural, • Operational, • Organisational 3
Let’s go back in time to year 2012 4
5
Back then we wanted • agile development, • scalability, •
resilience, • lower costs, • hybrid cloud. 6
Basically SOA + JVM was an answer! 7
But our system was too BIG & too complex to
do it with existing enterprise solutions 8
s/Enterprise/OSS/g Solutions ;) 9
we’ve started to do *buzzword* 10
And now, literally everyone is doing microservices!!?? 11
Microservices by Fowler 12 Lots of *buzzwords* http://martinfowler.com/articles/microservices.html
SOA ≈ microservices? 13
microservices architecture ≈ fine-grained SOA − enterprise (commercial) sh*t ≈
highly scalable, distributed system 14
Distributed systems • concurrency of components, • independent failure of
components, • lack of a global clock. 15
The Eight Fallacies of Distributed Computing 16 by Peter Deutsch
1991
#1: Network is reliable 17
#2: Latency is zero 18
#3: Bandwidth is infinite 19
#4: Network is secure 20
#5: Topology doesn’t change 21
#6: There is one administrator 22
#7: Transport cost is zero 23
#8: Network is homogeneous 24
distributed systems are hard → microservices are much harder ;)
25
What have we learnt? 26
Act I: architectural constraints 27
CAP is not just theorem it’s reality against us 28
bye, bye ACID semantics 29
Long live BASE guarantees! Basically Available, Soft state, Eventually consistent
30
distributed transactions add complexity 31
it’s far cheaper to do compensation 32
33 http://bravenewgeek.com/you-cannot-have-exactly-once-delivery/
you need idempotent APIs and events sinks 34
35 choreography > orchestration
So we’ve built Hermes a.k.a circulatory system 36
network can be congested! 37
REST+JSON on top of HTTP/1.1 is fine 38
REST+JSON on top of HTTP/2.0 with TLS is finer 39
we don’t rely on network anymore net splits in public
clouds happens everytime! 40
we adopted antifragile organization 41
42
powerful tandem 43 + Reactive programming Circuit breaker pattern
you need to support non- native old services, clients and
systems 44
45
conclusion: constant architecture improvement 46
47 Act II: operational troubles
creating new service should be instant! 48
49
automation with gradle & axions 50
51
so now we’ve got over 1800 repositories grouped under 250
projects 52
all with CI, code quality checks, security checks, integrated with
sonar & artefact repository 53
but what with services upgrades? 54
we’ve initially built our own service stack … and it
was ok - for a while 55
now we are extending spring-boot with so called andamio project
56
rapid deployments integrated with CI/CD environment and canary tests are
must-have 57
war files ▾ scp + puppet ▾ golden images ▾
docker (immutable images) ▾ 58
frequency of changes → automated monitoring, logging &
operational insights 59
graphite statsd cabot tessera kibana logstash zabbix newrelic selena pingdom
… 60
Monitoring As A Service + SLA Monitoring + 61
we need to build real-time anomaly detection soon 62
63 Act III: organizational shift
strategic DDD is good for splitting up monolith 64
but leave tactical DDD up to teams 65
huge polyglot hangover 66
acquiring distributed skills 67
you build it - you run it 68
coupling avoidance 69
please don’t audit me 70
distributed (micro) data curation 71
So after two years… 72
73
Final thoughts 74
75
76
77
Thanks! Any questions? Visit our blog: allegrotech.io Follow us on
twitter: @allegrotechblog Check our OSS projects: github.com/allegro And meetup group: meetup.com/allegrotech 78