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