25
How to slice your monolithic webapp using value.quality.scale MicroApps architecture

How to slice your monolithic webapp using MicroApps architecture

Embed Size (px)

Citation preview

Page 1: How to slice your monolithic webapp using MicroApps architecture

How to slice your monolithic webapp

using

value.quality.scale

MicroApps architecture

Page 2: How to slice your monolithic webapp using MicroApps architecture

@yonatanm

value.quality.scale

Page 3: How to slice your monolithic webapp using MicroApps architecture

Outbrain

0.5B> 250BUnique Visitors

RECS PER Month

Page 4: How to slice your monolithic webapp using MicroApps architecture

once upon a time...

Page 5: How to slice your monolithic webapp using MicroApps architecture

* Multiple teams* Multiple products* More and more features

* Multiple teams* Multiple products* More and more features

A few years later

Page 6: How to slice your monolithic webapp using MicroApps architecture

What's the tech-debt level ?

Question #1

Page 7: How to slice your monolithic webapp using MicroApps architecture

Answer #1

Page 8: How to slice your monolithic webapp using MicroApps architecture

Now what ?

Page 9: How to slice your monolithic webapp using MicroApps architecture

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

Page 10: How to slice your monolithic webapp using MicroApps architecture

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

Page 11: How to slice your monolithic webapp using MicroApps architecture

* Sessions

* Security

* Allow-Origin CORS

* Reuse common interceptors?

* Sessions

* Security

* Allow-Origin CORS

* Reuse common interceptors?

MicroServices naive Arch

Page 12: How to slice your monolithic webapp using MicroApps architecture

MicroApps Arch

Authentication && SECURITY && Session

app1/ /**Proxy

app2/ /**Proxy

app1

AuthO

APP2

AuthO

APP3

AuthO

app3/ /**Proxy

MicroApp1

GateWAY

Service

http://mysite/app1http://mysite/app2 http://mysite/app3

Page 13: How to slice your monolithic webapp using MicroApps architecture

How to get there?

Question #2

Page 14: How to slice your monolithic webapp using MicroApps architecture

How to get there?

Answer #2

Page 15: How to slice your monolithic webapp using MicroApps architecture

* Define your areas

* Map the areas

* Change routs if needed

* Define your areas

* Map the areas

* Change routs if neededapp1/

/**app2/

/**

Step #1 towards MicroApps

LEGACYwebapp

Page 16: How to slice your monolithic webapp using MicroApps architecture

Proxy and all that Jazzapp1

Auth

MicroApp

App1Proxy

* Routing* Handles inbound request* Handles outbound responses

* Routing* Handles inbound request* Handles outbound responses

LegaCYWeb App

app1/

/**GateWAYService

Page 17: How to slice your monolithic webapp using MicroApps architecture

The Proxy Protocol

App1Proxy

app1

Auth

MicroApp

* Session header

* Specific cookie

* User's IP

* Session header

* Specific cookie

* User's IP

* Body

* Encoding

* HTTP Status

* Body

* Encoding

* HTTP StatusLegaCYWeb App

GateWAYService

Page 18: How to slice your monolithic webapp using MicroApps architecture

Know your Proxy

* The Proxy Protocol

* Connection pool

* Performance metrics

* Failures metrics

* logs

* The Proxy Protocol

* Connection pool

* Performance metrics

* Failures metrics

* logs

Page 19: How to slice your monolithic webapp using MicroApps architecture

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

Page 20: How to slice your monolithic webapp using MicroApps architecture

Technology

* Custom technology stack * Reducing tech debt* Gradual upgrade* Velocity && Quality

* Custom technology stack * Reducing tech debt* Gradual upgrade* Velocity && Quality

Page 21: How to slice your monolithic webapp using MicroApps architecture

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 jobfreedom

Page 22: How to slice your monolithic webapp using MicroApps architecture

* 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

Page 23: How to slice your monolithic webapp using MicroApps architecture

* 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

In MicroApps

Page 24: How to slice your monolithic webapp using MicroApps architecture

Future work

* Circuit breaker

* Reusing web resources

* Open source it ?

* Circuit breaker

* Reusing web resources

* Open source it ?

Page 25: How to slice your monolithic webapp using MicroApps architecture

Thank You

Q && A

value.quality.scale

Want to know more about

Contact me

Want to know more about

Contact me

Outbrain's Architecture?