How to slice your
monolithic webapp
using
value.quality.scale
MicroApps architecture
@yonatanm
value.quality.scale
Outbrain
0.5B> 250BUnique
Visitors
RECS
PER Month
once upon a time...
* Multiple teams
* Multiple products
* More and more features
* Multiple teams
* Multiple products
* More and more features
A few years later
What's the tech-debt level ?
Question #1
Answer #1
Now what ?
Want to buy a MicroService?
* Hiding impl. details
* Deploy independently
* Robustness by isolation
* Independence / Autonomy
* Hiding impl. details
* Deploy independently
* Robustness by isolation
* Independence / Autonomy
MicroServices naive Arch
app1
AuthO
APP2
AuthO
APP3
AuthO
MicroApp1
http://mysite1/**
http://mysite2/**
http://mysite3/**
AOTHEN
SECURITY
SESSION
AOTHEN
SECURITY
SESSION
AOTHEN
SECURITY
SESSION
* Sessions
* Security
* Allow-Origin CORS
* Reuse common interceptors?
* Sessions
* Security
* Allow-Origin CORS
* Reuse common interceptors?
MicroServices naive Arch
MicroApps Arch
Authentication && SECURITY && Session
app1/ /**
Proxy
app2/ /**
Proxy
app1
AuthO
APP2
AuthO
APP3
AuthO
app3/ /**
Proxy
MicroApp1
GateWAY
Service
http://mysite/app1
http://mysite/app2
http://mysite/app3
How to get there?
Question #2
How to get there?
Answer #2
* Define your areas
* Map the areas
* Change routs if needed
* Define your areas
* Map the areas
* Change routs if needed
app1
/
/**
app2
/
/**
Step #1 towards MicroApps
LEGACYwebapp
Proxy and all that Jazz
app1
Auth
MicroApp
App1
Proxy
* Routing
* Handles inbound request
* Handles outbound responses
* Routing
* Handles inbound request
* Handles outbound responses
LegaCYWeb App
app1
/
/** GateWAYService
The Proxy Protocol
App1
Proxy
app1
Auth
MicroApp
* Session header
* Specific cookie
* User's IP
* Session header
* Specific cookie
* User's IP
* Body
* Encoding
* HTTP Status
* Body
* Encoding
* HTTP Status
LegaCYWeb App
GateWAYService
Know your Proxy
* The Proxy Protocol
* Connection pool
* Performance metrics
* Failures metrics
* logs
* The Proxy Protocol
* Connection pool
* Performance metrics
* Failures metrics
* logs
Infrastructure as a service
* Session as a service
* SSL
* Access logs
* Security
* Monitoring
* CDN integration
* Session as a service
* SSL
* Access logs
* Security
* Monitoring
* CDN integration
Authentication && SECURITY && Session
app1/ /**
Proxy
app2/ /**
Proxy
app3/ /**
Proxy
GateWAY
Service
Technology
* Custom technology stack
* Reducing tech debt
* Gradual upgrade
* Velocity && Quality
* Custom technology stack
* Reducing tech debt
* Gradual upgrade
* Velocity && Quality
Culture
* Autonomy and Freedom
* Clear ownership
* Focus
* Responsibility <>
Accountability
* Autonomy and Freedom
* Clear ownership
* Focus
* Responsibility <>
Accountability
I did it my Way
Giving ppl as much as possible to do their jobGiving ppl as much as possible to do their job
freedom
* Another moving part
* Latency
* hard to compete HAProxy
* no more one CSS to rule
them all
* Another moving part
* Latency
* hard to compete HAProxy
* no more one CSS to rule
them all
* Initiated ~ 2yrs ago
* 6+ MicroApps
– different teams
– different technology stack
* Gradual roll-out
* WIP - Rewrite Gateway Service
* Initiated ~ 2yrs ago
* 6+ MicroApps
– different teams
– different technology stack
* Gradual roll-out
* WIP - Rewrite Gateway Service
InMicroApps
Future work
* Circuit breaker
* Reusing web resources
* Open source it ?
* Circuit breaker
* Reusing web resources
* Open source it ?
Thank You
Q && A
value.quality.scale
Want to know more about
Contact me
Want to know more about
Contact me
Outbrain's Architecture?

How to slice your monolithic webapp using MicroApps architecture

  • 1.
    How to sliceyour monolithic webapp using value.quality.scale MicroApps architecture
  • 2.
  • 3.
  • 4.
    once upon atime...
  • 5.
    * Multiple teams *Multiple products * More and more features * Multiple teams * Multiple products * More and more features A few years later
  • 6.
    What's the tech-debtlevel ? Question #1
  • 7.
  • 8.
  • 9.
    Want to buya MicroService? * Hiding impl. details * Deploy independently * Robustness by isolation * Independence / Autonomy * Hiding impl. details * Deploy independently * Robustness by isolation * Independence / Autonomy
  • 10.
  • 11.
    * Sessions * Security *Allow-Origin CORS * Reuse common interceptors? * Sessions * Security * Allow-Origin CORS * Reuse common interceptors? MicroServices naive Arch
  • 12.
    MicroApps Arch Authentication &&SECURITY && Session app1/ /** Proxy app2/ /** Proxy app1 AuthO APP2 AuthO APP3 AuthO app3/ /** Proxy MicroApp1 GateWAY Service http://mysite/app1 http://mysite/app2 http://mysite/app3
  • 13.
    How to getthere? Question #2
  • 14.
    How to getthere? Answer #2
  • 15.
    * Define yourareas * Map the areas * Change routs if needed * Define your areas * Map the areas * Change routs if needed app1 / /** app2 / /** Step #1 towards MicroApps LEGACYwebapp
  • 16.
    Proxy and allthat Jazz app1 Auth MicroApp App1 Proxy * Routing * Handles inbound request * Handles outbound responses * Routing * Handles inbound request * Handles outbound responses LegaCYWeb App app1 / /** GateWAYService
  • 17.
    The Proxy Protocol App1 Proxy app1 Auth MicroApp *Session header * Specific cookie * User's IP * Session header * Specific cookie * User's IP * Body * Encoding * HTTP Status * Body * Encoding * HTTP Status LegaCYWeb App GateWAYService
  • 18.
    Know your Proxy *The Proxy Protocol * Connection pool * Performance metrics * Failures metrics * logs * The Proxy Protocol * Connection pool * Performance metrics * Failures metrics * logs
  • 19.
    Infrastructure as aservice * Session as a service * SSL * Access logs * Security * Monitoring * CDN integration * Session as a service * SSL * Access logs * Security * Monitoring * CDN integration Authentication && SECURITY && Session app1/ /** Proxy app2/ /** Proxy app3/ /** Proxy GateWAY Service
  • 20.
    Technology * Custom technologystack * Reducing tech debt * Gradual upgrade * Velocity && Quality * Custom technology stack * Reducing tech debt * Gradual upgrade * Velocity && Quality
  • 21.
    Culture * Autonomy andFreedom * Clear ownership * Focus * Responsibility <> Accountability * Autonomy and Freedom * Clear ownership * Focus * Responsibility <> Accountability I did it my Way Giving ppl as much as possible to do their jobGiving ppl as much as possible to do their job freedom
  • 22.
    * Another movingpart * Latency * hard to compete HAProxy * no more one CSS to rule them all * Another moving part * Latency * hard to compete HAProxy * no more one CSS to rule them all
  • 23.
    * Initiated ~2yrs ago * 6+ MicroApps – different teams – different technology stack * Gradual roll-out * WIP - Rewrite Gateway Service * Initiated ~ 2yrs ago * 6+ MicroApps – different teams – different technology stack * Gradual roll-out * WIP - Rewrite Gateway Service InMicroApps
  • 24.
    Future work * Circuitbreaker * Reusing web resources * Open source it ? * Circuit breaker * Reusing web resources * Open source it ?
  • 25.
    Thank You Q &&A value.quality.scale Want to know more about Contact me Want to know more about Contact me Outbrain's Architecture?