# Microservices --- #### Monolith  --- #### Microservice  ---- * Aufbau aus separaten Applikationen * Architektur * Techstack * Datenbank  --- #### Kommunikation - Monolith  ---- #### Kommunikation - Microservice  Error beim Speichern?
Rollback!
---- #### Saga  ```python try: for service in services: service() confirm_transaction() except: compensate(services) ``` --- #### Gateway  ```python if req.path.like('/catalog/**'): return requests.get("http://23.235.12.56:4675/**") ``` ---- #### Eureka 23.235.12.56:4675?  ```python if req.path.like('/catalog/**'): return requests.get("lb://catalog-service/**") ``` --- #### Showdown
Area
Monolith
Microservices
Development
๐
๐
SRP
๐
๐
Komplexitรคt
๐
๐
Cross-Cutting
๐
๐ค
Flexibilitรคt
๐
๐
Testing
๐
๐ค
Deployment
๐
๐ค
Scaling
๐
๐
note: * Development einzelner Services bequemer * Flexibilitรคt in Techstack * Scaling bei Monolith nur als Ganzes