> Markdown version of [/videos/440-back-end-to-the-future-embracing-the-continuous-evolution-of-infrastructure-and-code?t=444](https://www.wearedevelopers.com/videos/440-back-end-to-the-future-embracing-the-continuous-evolution-of-infrastructure-and-code?t=444). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Back(end) to the Future: Embracing the continuous Evolution of Infrastructure and Code How do you keep reactive APIs from becoming a debugging nightmare? Porsche engineers reveal their WebFlux sandwich strategy using Kotlin Coroutines for highly scalable, serverless microservices. - **Speakers:** Matthias Falkenberg, Timo Knapp - **Event:** World Congress 2022 - **Published:** June 15, 2022 - **Duration:** 40:32 - **URL:** https://www.wearedevelopers.com/videos/440-back-end-to-the-future-embracing-the-continuous-evolution-of-infrastructure-and-code ## Summary Porsche engineers detail the dual evolution of their digital product’s backend-for-frontend (BFF) architecture and its underlying cloud infrastructure. Initially aiming to unify multiple standalone vehicle applications, the team structured a BFF to provide an isolated, intuitive API for front-end developers. To achieve high scalability without exhausting thread pools, they transitioned from the synchronous Spring Web MVC to the event-driven, non-blocking Spring WebFlux framework. However, as business requirements expanded, the highly declarative nature of the Reactor API proved difficult to debug and maintain. To reclaim the straightforward readability of imperative code while preserving reactive performance, the team integrated Kotlin Coroutines into their WebFlux stack. This phased refactoring strategy, playfully dubbed the "WebFlux sandwich," keeps peripheral bounds—Spring controllers and remote web client calls—declarative, while transforming complex internal business logic into suspendable coroutine computations. Performance benchmarking confirmed this hybrid approach handles heavy concurrent scaling robustly, safely dodging the abrupt out-of-memory crashes characteristic of vintage thread-per-request models. Contemporaneously, the deprecation of their legacy Cloud Foundry platform incited a complete infrastructure overhaul. Needing a low-maintenance, serverless environment that supported Dockerized microservices without mandating code rewrites, the team migrated to Azure Container Apps. Provisioned natively as infrastructure-as-code using Bicep templates, the new ecosystem harnesses Dapr sidecars for resilient service-to-service communication and KEDA for dynamic auto-scaling down to zero. Despite preview-phase routing hurdles, this modernized infrastructure reliably enables blue-green deployments, granular traffic splitting, and future-proof bidirectional socket communication. **Keywords:** backend-for-frontend architecture, spring webflux migration, kotlin coroutines pattern, azure container apps deployment, reactive programming scalability, non-blocking asynchronous logic, declarative vs imperative coding, dapr sidecar communication, keda event-driven scaling, infrastructure-as-code bicep, spring boot microservices, blue-green deployment strategy, thread-pool optimization, container runtime orchestration, cloud foundry legacy migration ## Chapters 1. **Consolidating mobile apps with a centralized backend for frontend** (00:05) — How a unified backend for frontend simplified API integrations across multiple vehicle generations. 1. **The limitations of thread-based Spring Web MVC** (05:05) — Imperative coding with thread-per-request models struggles with resource exhaustion and scalability constraints. 1. **Adopting Spring WebFlux and the Reactor API** (07:24) — Moving to a non-blocking, event-driven architecture improves scalability but introduces declarative complexity. 1. **Taming declarative complexity with Kotlin Coroutines** (09:41) — Combining WebFlux with Kotlin Coroutines restores a familiar imperative coding style for complex business logic. 1. **Migrating incrementally using the WebFlux sandwich strategy** (12:04) — A step-by-step approach mixes the Reactor API on the edges while rewriting core business logic with Coroutines. 1. **Benchmarking concurrency models and throughput performance** (17:31) — Stress tests reveal the memory limitations of Web MVC and the scaling advantages of various WebFlux combinations. 1. **Challenges of legacy cloud infrastructure runtimes** (20:47) — The previous managed platform as a service restricted infrastructure configuration, load balancing, and logging access. 1. **Evaluating Azure compute options for a new platform** (24:05) — Strict requirements for easy migration and low maintenance ruled out virtual machines and standard Kubernetes clusters. 1. **Running microservices on Azure Container Apps** (29:53) — The chosen serverless platform leverages integrated frameworks like KEDA for scaling and Dapr for service communication. 1. **Provisioning a secure container infrastructure with Bicep** (33:04) — Infrastructure as code templates automate the deployment of virtual networks, gateways, and Docker image environments. 1. **Navigating preview bugs in Azure Container Apps** (36:01) — Early adoption required debugging missing subnets, stuck provisioning states, and default content-type headers intercepted by Dapr. ## Related Moments - [Applying backend microservice and virtualization patterns to frontends](https://www.wearedevelopers.com/videos/1587-web-fragments-incremental-micro-frontends-migration-approach-for-enterprise) (from "Web-Fragments: incremental micro-frontends migration approach for enterprise") - [Evolving architectures from backend microservices to micro frontends](https://www.wearedevelopers.com/videos/130-front-end-micro-apps) (from "Front-End Micro Apps") - [Overcoming challenges of scaling legacy monolithic frontend applications](https://www.wearedevelopers.com/videos/236-microfrontends-at-scale) (from "Microfrontends at Scale") - [Backend architecture and legacy integrations at Porsche](https://www.wearedevelopers.com/videos/69-slip-through-the-boundaries-of-legacy-systems-with-kotlin-and-spring-webflux) (from "Slip Through the Boundaries of Legacy Systems with Kotlin and Spring WebFlux") - [Evolution of frontend and microservices architectures](https://www.wearedevelopers.com/videos/873-interface-contracts-in-microfrontend-architectures) (from "Interface Contracts in Microfrontend Architectures") - [Implementing application frontends with modular service architectures](https://www.wearedevelopers.com/videos/200-agile-work-at-cariad-creating-a-customer-web-application-for-controlling-the-vehicle) (from "Agile work at CARIAD – Creating a customer web application for controlling the vehicle ") ## Related Articles - [Dev Digest 120 - Apple and peers](https://www.wearedevelopers.com/magazine/455-dev-digest-120-apple-and-peers) - [Dev Digest 132 - Binging WADFlix?](https://www.wearedevelopers.com/magazine/473-dev-digest-132-binging-wadflix) - [c't <webdev> 2023](https://www.wearedevelopers.com/magazine/307-c-t-webdev-2023) - [Dev Digest 107 - And the OSScar goes to…](https://www.wearedevelopers.com/magazine/405-dev-digest-107-and-the-osscar-goes-to) ## Related Jobs - [Junior Frontend Engineer](https://www.wearedevelopers.com/jobs/ext/1532351-junior-frontend-engineer) at **Almedia** - [Senior Backend Engineer (Java)](https://www.wearedevelopers.com/jobs/ext/19369-senior-backend-engineer-java) at **Bonial International GmbH** - [Mid/Senior Full-Stack Engineer (Web-first)](https://www.wearedevelopers.com/jobs/ext/1210833-mid-senior-full-stack-engineer-web-first) at **SMG Swiss Marketplace Group** - [Backend Entwickler C#/.NET iv.)](https://www.wearedevelopers.com/jobs/ext/1262419-backend-entwickler-c-net-iv) at **Bosch-Gruppe Österreich** - [Staff Software Engineer](https://www.wearedevelopers.com/jobs/ext/1425755-staff-software-engineer) at **GitHub** - [Staff Frontend Engineer (Expert+/Lead equivalent) - Hybrid working model, 100%, Ho Chi Minh City](https://www.wearedevelopers.com/jobs/48314-staff-frontend-engineer-expert-lead-equivalent-hybrid-working-model-100-ho-chi-minh-city) at **SMG Swiss Marketplace Group**