BANCO RENDIMENTO:
LEGACY MODERNIZATION
THE "BLACK BOX" ARCHAEOLOGY
"We were dealing with code written before Git was the industry standard. We're talking Classic ASP and scripts from the early 2000s running core banking operations."
The friction wasn't just technical debt; it was technical risk. The system was a "Black Box" where maintenance was nearly impossible—changing a line of code felt like defusing a bomb without a manual.
Zero Version Control
Parts of the legacy system had no commit history.
Fear-Driven Deployment
Deployments were rare and painful; unknown impact radius.
Performance Bottlenecks
Ancient tech couldn't scale to modern demands.
STRANGLER FIG & .NET 9
[ Angular Client ]
|
v
[ Ocelot BFF (.NET 9 Gateway) ]
|
+--- (Legacy Routes) ---> [ Classic ASP / Legacy Monolith ]
|
+--- (Modern Routes) ---> [ New Microservices (.NET 9) ]
|
+--> [ Keycloak (Auth) ]
|
+--> [ SQL Server ]We chose the Strangler Fig Pattern to mitigate risk. We don't rewrite everything at once; we "strangle" the legacy system route by route.
Ocelot Gateway (BFF): Acts as the facade. It handles routing and aggregation. Frontend is agnostic to the backend implementation.
Domain-Driven Design (DDD): New services enforce strict business rules, not just scripts.
Keycloak: Centralized Identity Management (OAuth2/OIDC).
AGGREGATION & MODERNIZATION
The biggest engineering challenge was ensuring the new .NET 9 services could coexist with the chaos of the past while delivering superior performance.
Mapping Ocelot endpoints to new microservices, instantly modernizing features.
Ocelot aggregates 5+ calls backend-side, reducing latency and chatty traffic.
Moving from loose scripting to C# strong typing for reliability.
// Ocelot Configuration Example (Simplification)
{
"Routes": [
{
"DownstreamPathTemplate": "/api/v1/investments/{userId}",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{ "Host": "new-investment-service", "Port": 80 }
],
"UpstreamPathTemplate": "/investments/{userId}",
"UpstreamHttpMethod": [ "Get" ]
},
{
"DownstreamPathTemplate": "/old-asp/account.asp",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{ "Host": "legacy-server", "Port": 80 }
],
"UpstreamPathTemplate": "/account/details",
"UpstreamHttpMethod": [ "Get" ]
}
]
}ANGULAR MODULAR MONOLITH
While the backend is distributed, the frontend needs to be cohesive. We avoided the "Micro-frontends" hype trap which would add unnecessary complexity at this stage. Instead, we built a Modular Monolith.
We implemented a standardized UI Kit and strict TypeScript interfaces. A Junior dev doesn't need to guess how to build a service call; they follow the architectural blueprint.
Performance - Leveraging the latest .NET runtime features (AOT, JIT) for future-proof, fast services.
Decoupling - Successfully identified and mapped over 15 distinct business contexts being strangled out.
Zero Downtime - The Ocelot Gateway allows instant traffic switching without disrupting the end-user.