# MicroApps Architecture -- The way to do microservices for web apps

- Speaker: [Yonatan Maman](/wiki/speakers/yonatan-maman.md)
- Event: [Reversim Summit 2016](/wiki/years/2016.md)
- Video: https://www.youtube.com/watch?v=XtHCs2odiec
- Transcript: [/transcripts/2016/30-XtHCs2odiec.md](/transcripts/2016/30-XtHCs2odiec.md)
- Language: Hebrew · Type: talk · Level: intermediate
- Topics: [Microservices](/wiki/topics/microservices.md), [Architecture](/wiki/topics/architecture.md), [Frontend](/wiki/topics/frontend.md), [Technical Debt](/wiki/topics/technical-debt.md)

> Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

## Summary

The speaker discusses MicroApps architecture, a pattern designed to break down large monolithic web applications into smaller, manageable, and independent services. The speaker explains the challenges of maintaining a legacy web monolith and why standard microservices do not directly solve frontend-specific concerns like session management and security. By introducing a custom gateway proxy layer, teams can achieve technological freedom and faster deployment while centralizing cross-cutting infrastructure concerns. Ultimately, the audience learns how to apply microservices principles specifically to web applications.

## Key points

- [0:00](https://www.youtube.com/watch?v=XtHCs2odiec) The speaker introduces the MicroApps architecture as a way to split large monolithic web applications into smaller parts.
- [1:09](https://www.youtube.com/watch?v=XtHCs2odiec&t=69s) Many startups begin with a single web application that naturally grows over time and accumulates significant technical debt.
- [5:33](https://www.youtube.com/watch?v=XtHCs2odiec&t=333s) As multiple teams work on the same monolith, dependencies in testing, deployment, and ownership create bottlenecks.
- [8:52](https://www.youtube.com/watch?v=XtHCs2odiec&t=532s) While backend microservices solve some scaling problems, applying them naively to web apps creates new issues with routing, sessions, and security.
- [13:08](https://www.youtube.com/watch?v=XtHCs2odiec&t=788s) The proposed MicroApps architecture uses a centralized gateway proxy to handle cross-cutting concerns while routing traffic to independent web apps.
- [17:26](https://www.youtube.com/watch?v=XtHCs2odiec&t=1046s) The proxy injects necessary headers, user session data, and client IP addresses before forwarding requests to the specific backend application.
- [19:58](https://www.youtube.com/watch?v=XtHCs2odiec&t=1198s) Benefits of this approach include infrastructure as a service, team autonomy, technology diversity, and independent deployments.
- [34:58](https://www.youtube.com/watch?v=XtHCs2odiec&t=2098s) Drawbacks include added latency, debugging complexity with an extra network hop, and the challenge of sharing static frontend assets.

## Takeaways

- Deconstruct monolithic web applications by placing a gateway proxy in front of independent, domain-specific web apps.
- Centralize cross-cutting infrastructure concerns such as authentication, sessions, and security at the proxy layer.
- Allow individual development teams to choose their own technology stacks to increase ownership and velocity.

## Questions this talk answers

- How can you handle user session management and authentication when splitting a web monolith into multiple applications?
- What are the trade-offs of introducing a gateway proxy layer for web microservices versus standard load balancers?
- How do you gradually migrate a legacy web monolithic codebase to a MicroApps architecture?

## Technologies

Java, Node.js, Express, Scala, Spring, Struts, HTTP

## Tags

frontend architecture, microservices, monolith to microservices, scalability, system design, web architecture
