[{"data":1,"prerenderedAt":188},["ShallowReactive",2],{"blog-post-en-\u002Fblog\u002Fresilient-microservices":3},{"id":4,"title":5,"body":6,"date":172,"description":173,"draft":174,"extension":175,"meta":176,"navigation":177,"path":178,"readingTime":179,"seo":180,"stem":181,"tags":182,"__hash__":187},"blog_en\u002Fen\u002Fblog\u002Fresilient-microservices.md","Building Resilient Microservices: Lessons from Banking at Scale",{"type":7,"value":8,"toc":164},"minimark",[9,14,18,23,26,73,76,80,83,97,100,104,107,125,128,132,135,161],[10,11,13],"h1",{"id":12},"building-resilient-microservices","Building Resilient Microservices",[15,16,17],"p",{},"After modernizing two major banking platforms, I've learned that the hardest part isn't the technology — it's the organizational and data boundaries.",[19,20,22],"h2",{"id":21},"start-with-bounded-contexts","Start with Bounded Contexts",[15,24,25],{},"The biggest mistake teams make is splitting by technical layer (controller\u002Fservice\u002Frepository) instead of business domain. When we decomposed Banco Nacional's monolith, we identified 7 bounded contexts first:",[27,28,29,37,43,49,55,61,67],"ul",{},[30,31,32,36],"li",{},[33,34,35],"strong",{},"Accounts"," — balance, account history",[30,38,39,42],{},[33,40,41],{},"Transfers"," — internal and external transfers",[30,44,45,48],{},[33,46,47],{},"Payments"," — bill pay, scheduled payments",[30,50,51,54],{},[33,52,53],{},"Auth"," — session, OAuth, 2FA",[30,56,57,60],{},[33,58,59],{},"Notifications"," — push, SMS, email",[30,62,63,66],{},[33,64,65],{},"Audit"," — regulatory logging",[30,68,69,72],{},[33,70,71],{},"Reconciliation"," — end-of-day settlement",[15,74,75],{},"Each became a microservice. Each owned its database. No shared tables.",[19,77,79],{"id":78},"polyglot-persistence-is-real","Polyglot Persistence Is Real",[15,81,82],{},"Not every service needs PostgreSQL. We used:",[27,84,85,88,91,94],{},[30,86,87],{},"PostgreSQL for ACID-required flows (transfers, payments)",[30,89,90],{},"Redis for session state and rate limiting",[30,92,93],{},"MongoDB for audit logs (write-heavy, schema-flexible)",[30,95,96],{},"Kafka as the event backbone",[15,98,99],{},"This reduced cost and improved fit-for-purpose. But it introduced operational complexity — you need observability tooling that works across data stores.",[19,101,103],{"id":102},"deployment-strategy-matters-more-than-you-think","Deployment Strategy Matters More Than You Think",[15,105,106],{},"Blue-green deployments saved us more than once. The pattern:",[108,109,110,113,116,119,122],"ol",{},[30,111,112],{},"Deploy new version to green environment (0% traffic)",[30,114,115],{},"Run smoke tests against green",[30,117,118],{},"Shift 10% traffic to green (canary)",[30,120,121],{},"Monitor error rate for 5 minutes",[30,123,124],{},"Shift 100% or rollback — decision in \u003C 10 minutes",[15,126,127],{},"This is impossible with a monolith. With microservices, it's routine.",[19,129,131],{"id":130},"the-real-cost-of-microservices","The Real Cost of Microservices",[15,133,134],{},"Microservices aren't free. You pay in:",[27,136,137,143,149,155],{},[30,138,139,142],{},[33,140,141],{},"Operational complexity"," — distributed tracing, service mesh, log aggregation",[30,144,145,148],{},[33,146,147],{},"Network latency"," — every cross-service call adds 5-20ms",[30,150,151,154],{},[33,152,153],{},"Eventual consistency"," — you can't do a JOIN across services",[30,156,157,160],{},[33,158,159],{},"Testing"," — contract tests, integration tests, end-to-end tests",[15,162,163],{},"The payoff: independent deployment, independent scaling, fault isolation. For banking at scale, the trade-off is worth it.",{"title":165,"searchDepth":166,"depth":166,"links":167},"",2,[168,169,170,171],{"id":21,"depth":166,"text":22},{"id":78,"depth":166,"text":79},{"id":102,"depth":166,"text":103},{"id":130,"depth":166,"text":131},"2024-12-15","What I learned modernizing banking platforms — from monolith to 40+ microservices handling 12M requests\u002Fday.",false,"md",{},true,"\u002Fen\u002Fblog\u002Fresilient-microservices",8,{"title":5,"description":173},"en\u002Fblog\u002Fresilient-microservices",[183,184,185,186],"microservices","banking","architecture","kubernetes","lu7zm10mHWYTOUct3pM90yxzp2lKOsCc6lWfUJGLh4M",1783872773229]