[{"data":1,"prerenderedAt":11087},["ShallowReactive",2],{"blog-event-driven-dotnet-azure":3,"blog-related-event-driven-dotnet-azure":2999,"content-query-WcoUItC2xq":8522},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"slug":10,"date":11,"readTime":12,"category":13,"image":14,"imageCaption":15,"author":16,"tags":25,"body":31,"_type":2993,"_id":2994,"_source":2995,"_file":2996,"_stem":2997,"_extension":2998},"/blog/event-driven-dotnet-azure","blog",false,"","Building Event-Driven Systems with .NET 8 and Azure Service Bus","A practical guide to implementing event-driven architecture with .NET 8 and Azure messaging—covering domain event design, the outbox pattern, fault-tolerant consumers, and distributed tracing.","event-driven-dotnet-azure","2025-01-30","14 min","Backend","https://images.unsplash.com/photo-1558494949-ef010cbdcc31?w=1200&h=600&fit=crop&auto=format","Azure cloud messaging infrastructure enabling event-driven microservices",{"name":17,"role":18,"avatar":19,"bio":20,"social":21},"Tobias Lie-Atjam","Founder & Senior Software Engineer at MediaFront","https://images.unsplash.com/photo-1560250097-0b93528c311a?w=400&h=400&fit=crop&auto=format","Tobias is the founder of MediaFront. He specialises in cloud-native architecture, Rust, and .NET—helping businesses build high-performance systems that scale.",{"github":22,"twitter":23,"linkedin":24},"https://github.com/","https://twitter.com/","https://linkedin.com/",[26,27,28,29,30],".NET","Azure","Event-Driven","Microservices","Cloud",{"type":32,"children":33,"toc":2983},"root",[34,43,49,54,60,65,162,167,173,178,236,653,666,672,677,689,1082,1087,1689,1708,1714,1719,2213,2218,2224,2229,2802,2808,2813,2922,2927,2933,2938,2972,2977],{"type":35,"tag":36,"props":37,"children":39},"element","h2",{"id":38},"why-event-driven-architecture-wins-at-scale",[40],{"type":41,"value":42},"text","Why Event-Driven Architecture Wins at Scale",{"type":35,"tag":44,"props":45,"children":46},"p",{},[47],{"type":41,"value":48},"Traditional REST-first microservices create hidden coupling: Service A calls Service B synchronously, which calls Service C, and suddenly you have a distributed monolith where a slow database query in Service C causes timeouts in Service A's checkout flow.",{"type":35,"tag":44,"props":50,"children":51},{},[52],{"type":41,"value":53},"Event-driven architecture breaks this chain. Services emit events—\"something happened\"—and other services react asynchronously. No service knows or cares what subscribes to its events. The result is a system that degrades gracefully, scales independently, and evolves without cross-team coordination overhead.",{"type":35,"tag":36,"props":55,"children":57},{"id":56},"azures-messaging-trifecta",[58],{"type":41,"value":59},"Azure's Messaging Trifecta",{"type":35,"tag":44,"props":61,"children":62},{},[63],{"type":41,"value":64},"Azure offers three messaging primitives, each with a distinct role:",{"type":35,"tag":66,"props":67,"children":68},"table",{},[69,93],{"type":35,"tag":70,"props":71,"children":72},"thead",{},[73],{"type":35,"tag":74,"props":75,"children":76},"tr",{},[77,83,88],{"type":35,"tag":78,"props":79,"children":80},"th",{},[81],{"type":41,"value":82},"Service",{"type":35,"tag":78,"props":84,"children":85},{},[86],{"type":41,"value":87},"Model",{"type":35,"tag":78,"props":89,"children":90},{},[91],{"type":41,"value":92},"Best For",{"type":35,"tag":94,"props":95,"children":96},"tbody",{},[97,120,141],{"type":35,"tag":74,"props":98,"children":99},{},[100,110,115],{"type":35,"tag":101,"props":102,"children":103},"td",{},[104],{"type":35,"tag":105,"props":106,"children":107},"strong",{},[108],{"type":41,"value":109},"Service Bus",{"type":35,"tag":101,"props":111,"children":112},{},[113],{"type":41,"value":114},"Queues + Topics",{"type":35,"tag":101,"props":116,"children":117},{},[118],{"type":41,"value":119},"Reliable business message delivery, FIFO, dead-lettering",{"type":35,"tag":74,"props":121,"children":122},{},[123,131,136],{"type":35,"tag":101,"props":124,"children":125},{},[126],{"type":35,"tag":105,"props":127,"children":128},{},[129],{"type":41,"value":130},"Event Grid",{"type":35,"tag":101,"props":132,"children":133},{},[134],{"type":41,"value":135},"Pub/Sub routing",{"type":35,"tag":101,"props":137,"children":138},{},[139],{"type":41,"value":140},"Reactive event routing, Azure resource events, webhooks",{"type":35,"tag":74,"props":142,"children":143},{},[144,152,157],{"type":35,"tag":101,"props":145,"children":146},{},[147],{"type":35,"tag":105,"props":148,"children":149},{},[150],{"type":41,"value":151},"Event Hubs",{"type":35,"tag":101,"props":153,"children":154},{},[155],{"type":41,"value":156},"Streaming",{"type":35,"tag":101,"props":158,"children":159},{},[160],{"type":41,"value":161},"High-throughput telemetry, log aggregation, stream processing",{"type":35,"tag":44,"props":163,"children":164},{},[165],{"type":41,"value":166},"For most business-process event-driven systems, Service Bus Topics with Subscriptions are the right starting point. Event Hubs becomes relevant when you're ingesting millions of events per second (IoT, clickstream). Event Grid shines for reacting to Azure infrastructure events.",{"type":35,"tag":36,"props":168,"children":170},{"id":169},"designing-domain-events",[171],{"type":41,"value":172},"Designing Domain Events",{"type":35,"tag":44,"props":174,"children":175},{},[176],{"type":41,"value":177},"Domain events capture meaningful changes in your business model. Three rules make them effective:",{"type":35,"tag":179,"props":180,"children":181},"ol",{},[182,208,218],{"type":35,"tag":183,"props":184,"children":185},"li",{},[186,191,193,200,202],{"type":35,"tag":105,"props":187,"children":188},{},[189],{"type":41,"value":190},"Named in past tense",{"type":41,"value":192}," — ",{"type":35,"tag":194,"props":195,"children":197},"code",{"className":196},[],[198],{"type":41,"value":199},"OrderPlaced",{"type":41,"value":201},", not ",{"type":35,"tag":194,"props":203,"children":205},{"className":204},[],[206],{"type":41,"value":207},"PlaceOrder",{"type":35,"tag":183,"props":209,"children":210},{},[211,216],{"type":35,"tag":105,"props":212,"children":213},{},[214],{"type":41,"value":215},"Immutable and self-contained",{"type":41,"value":217}," — everything a consumer needs to react is in the event itself",{"type":35,"tag":183,"props":219,"children":220},{},[221,226,228,234],{"type":35,"tag":105,"props":222,"children":223},{},[224],{"type":41,"value":225},"Versioned",{"type":41,"value":227}," — add a ",{"type":35,"tag":194,"props":229,"children":231},{"className":230},[],[232],{"type":41,"value":233},"SchemaVersion",{"type":41,"value":235}," field from day one; you will change the schema",{"type":35,"tag":237,"props":238,"children":242},"pre",{"className":239,"code":240,"language":241,"meta":7,"style":7},"language-csharp shiki shiki-themes github-light","public sealed record OrderPlacedEvent\n{\n    public required Guid EventId { get; init; } = Guid.NewGuid();\n    public required int SchemaVersion { get; init; } = 1;\n    public required Guid OrderId { get; init; }\n    public required string CustomerId { get; init; }\n    public required IReadOnlyList\u003COrderLineItem> Items { get; init; }\n    public required decimal TotalAmount { get; init; }\n    public required DateTimeOffset OccurredAt { get; init; } = DateTimeOffset.UtcNow;\n}\n","csharp",[243],{"type":35,"tag":194,"props":244,"children":245},{"__ignoreMap":7},[246,274,284,353,410,452,494,551,593,644],{"type":35,"tag":247,"props":248,"children":251},"span",{"class":249,"line":250},"line",1,[252,258,263,268],{"type":35,"tag":247,"props":253,"children":255},{"style":254},"--shiki-default:#D73A49",[256],{"type":41,"value":257},"public",{"type":35,"tag":247,"props":259,"children":260},{"style":254},[261],{"type":41,"value":262}," sealed",{"type":35,"tag":247,"props":264,"children":265},{"style":254},[266],{"type":41,"value":267}," record",{"type":35,"tag":247,"props":269,"children":271},{"style":270},"--shiki-default:#6F42C1",[272],{"type":41,"value":273}," OrderPlacedEvent\n",{"type":35,"tag":247,"props":275,"children":277},{"class":249,"line":276},2,[278],{"type":35,"tag":247,"props":279,"children":281},{"style":280},"--shiki-default:#24292E",[282],{"type":41,"value":283},"{\n",{"type":35,"tag":247,"props":285,"children":287},{"class":249,"line":286},3,[288,293,298,303,308,313,318,323,328,333,338,343,348],{"type":35,"tag":247,"props":289,"children":290},{"style":254},[291],{"type":41,"value":292},"    public",{"type":35,"tag":247,"props":294,"children":295},{"style":254},[296],{"type":41,"value":297}," required",{"type":35,"tag":247,"props":299,"children":300},{"style":270},[301],{"type":41,"value":302}," Guid",{"type":35,"tag":247,"props":304,"children":305},{"style":270},[306],{"type":41,"value":307}," EventId",{"type":35,"tag":247,"props":309,"children":310},{"style":280},[311],{"type":41,"value":312}," { ",{"type":35,"tag":247,"props":314,"children":315},{"style":254},[316],{"type":41,"value":317},"get",{"type":35,"tag":247,"props":319,"children":320},{"style":280},[321],{"type":41,"value":322},"; ",{"type":35,"tag":247,"props":324,"children":325},{"style":254},[326],{"type":41,"value":327},"init",{"type":35,"tag":247,"props":329,"children":330},{"style":280},[331],{"type":41,"value":332},"; } ",{"type":35,"tag":247,"props":334,"children":335},{"style":254},[336],{"type":41,"value":337},"=",{"type":35,"tag":247,"props":339,"children":340},{"style":280},[341],{"type":41,"value":342}," Guid.",{"type":35,"tag":247,"props":344,"children":345},{"style":270},[346],{"type":41,"value":347},"NewGuid",{"type":35,"tag":247,"props":349,"children":350},{"style":280},[351],{"type":41,"value":352},"();\n",{"type":35,"tag":247,"props":354,"children":356},{"class":249,"line":355},4,[357,361,365,370,375,379,383,387,391,395,399,405],{"type":35,"tag":247,"props":358,"children":359},{"style":254},[360],{"type":41,"value":292},{"type":35,"tag":247,"props":362,"children":363},{"style":254},[364],{"type":41,"value":297},{"type":35,"tag":247,"props":366,"children":367},{"style":254},[368],{"type":41,"value":369}," int",{"type":35,"tag":247,"props":371,"children":372},{"style":270},[373],{"type":41,"value":374}," SchemaVersion",{"type":35,"tag":247,"props":376,"children":377},{"style":280},[378],{"type":41,"value":312},{"type":35,"tag":247,"props":380,"children":381},{"style":254},[382],{"type":41,"value":317},{"type":35,"tag":247,"props":384,"children":385},{"style":280},[386],{"type":41,"value":322},{"type":35,"tag":247,"props":388,"children":389},{"style":254},[390],{"type":41,"value":327},{"type":35,"tag":247,"props":392,"children":393},{"style":280},[394],{"type":41,"value":332},{"type":35,"tag":247,"props":396,"children":397},{"style":254},[398],{"type":41,"value":337},{"type":35,"tag":247,"props":400,"children":402},{"style":401},"--shiki-default:#005CC5",[403],{"type":41,"value":404}," 1",{"type":35,"tag":247,"props":406,"children":407},{"style":280},[408],{"type":41,"value":409},";\n",{"type":35,"tag":247,"props":411,"children":413},{"class":249,"line":412},5,[414,418,422,426,431,435,439,443,447],{"type":35,"tag":247,"props":415,"children":416},{"style":254},[417],{"type":41,"value":292},{"type":35,"tag":247,"props":419,"children":420},{"style":254},[421],{"type":41,"value":297},{"type":35,"tag":247,"props":423,"children":424},{"style":270},[425],{"type":41,"value":302},{"type":35,"tag":247,"props":427,"children":428},{"style":270},[429],{"type":41,"value":430}," OrderId",{"type":35,"tag":247,"props":432,"children":433},{"style":280},[434],{"type":41,"value":312},{"type":35,"tag":247,"props":436,"children":437},{"style":254},[438],{"type":41,"value":317},{"type":35,"tag":247,"props":440,"children":441},{"style":280},[442],{"type":41,"value":322},{"type":35,"tag":247,"props":444,"children":445},{"style":254},[446],{"type":41,"value":327},{"type":35,"tag":247,"props":448,"children":449},{"style":280},[450],{"type":41,"value":451},"; }\n",{"type":35,"tag":247,"props":453,"children":455},{"class":249,"line":454},6,[456,460,464,469,474,478,482,486,490],{"type":35,"tag":247,"props":457,"children":458},{"style":254},[459],{"type":41,"value":292},{"type":35,"tag":247,"props":461,"children":462},{"style":254},[463],{"type":41,"value":297},{"type":35,"tag":247,"props":465,"children":466},{"style":254},[467],{"type":41,"value":468}," string",{"type":35,"tag":247,"props":470,"children":471},{"style":270},[472],{"type":41,"value":473}," CustomerId",{"type":35,"tag":247,"props":475,"children":476},{"style":280},[477],{"type":41,"value":312},{"type":35,"tag":247,"props":479,"children":480},{"style":254},[481],{"type":41,"value":317},{"type":35,"tag":247,"props":483,"children":484},{"style":280},[485],{"type":41,"value":322},{"type":35,"tag":247,"props":487,"children":488},{"style":254},[489],{"type":41,"value":327},{"type":35,"tag":247,"props":491,"children":492},{"style":280},[493],{"type":41,"value":451},{"type":35,"tag":247,"props":495,"children":497},{"class":249,"line":496},7,[498,502,506,511,516,521,526,531,535,539,543,547],{"type":35,"tag":247,"props":499,"children":500},{"style":254},[501],{"type":41,"value":292},{"type":35,"tag":247,"props":503,"children":504},{"style":254},[505],{"type":41,"value":297},{"type":35,"tag":247,"props":507,"children":508},{"style":270},[509],{"type":41,"value":510}," IReadOnlyList",{"type":35,"tag":247,"props":512,"children":513},{"style":280},[514],{"type":41,"value":515},"\u003C",{"type":35,"tag":247,"props":517,"children":518},{"style":270},[519],{"type":41,"value":520},"OrderLineItem",{"type":35,"tag":247,"props":522,"children":523},{"style":280},[524],{"type":41,"value":525},"> ",{"type":35,"tag":247,"props":527,"children":528},{"style":270},[529],{"type":41,"value":530},"Items",{"type":35,"tag":247,"props":532,"children":533},{"style":280},[534],{"type":41,"value":312},{"type":35,"tag":247,"props":536,"children":537},{"style":254},[538],{"type":41,"value":317},{"type":35,"tag":247,"props":540,"children":541},{"style":280},[542],{"type":41,"value":322},{"type":35,"tag":247,"props":544,"children":545},{"style":254},[546],{"type":41,"value":327},{"type":35,"tag":247,"props":548,"children":549},{"style":280},[550],{"type":41,"value":451},{"type":35,"tag":247,"props":552,"children":554},{"class":249,"line":553},8,[555,559,563,568,573,577,581,585,589],{"type":35,"tag":247,"props":556,"children":557},{"style":254},[558],{"type":41,"value":292},{"type":35,"tag":247,"props":560,"children":561},{"style":254},[562],{"type":41,"value":297},{"type":35,"tag":247,"props":564,"children":565},{"style":254},[566],{"type":41,"value":567}," decimal",{"type":35,"tag":247,"props":569,"children":570},{"style":270},[571],{"type":41,"value":572}," TotalAmount",{"type":35,"tag":247,"props":574,"children":575},{"style":280},[576],{"type":41,"value":312},{"type":35,"tag":247,"props":578,"children":579},{"style":254},[580],{"type":41,"value":317},{"type":35,"tag":247,"props":582,"children":583},{"style":280},[584],{"type":41,"value":322},{"type":35,"tag":247,"props":586,"children":587},{"style":254},[588],{"type":41,"value":327},{"type":35,"tag":247,"props":590,"children":591},{"style":280},[592],{"type":41,"value":451},{"type":35,"tag":247,"props":594,"children":596},{"class":249,"line":595},9,[597,601,605,610,615,619,623,627,631,635,639],{"type":35,"tag":247,"props":598,"children":599},{"style":254},[600],{"type":41,"value":292},{"type":35,"tag":247,"props":602,"children":603},{"style":254},[604],{"type":41,"value":297},{"type":35,"tag":247,"props":606,"children":607},{"style":270},[608],{"type":41,"value":609}," DateTimeOffset",{"type":35,"tag":247,"props":611,"children":612},{"style":270},[613],{"type":41,"value":614}," OccurredAt",{"type":35,"tag":247,"props":616,"children":617},{"style":280},[618],{"type":41,"value":312},{"type":35,"tag":247,"props":620,"children":621},{"style":254},[622],{"type":41,"value":317},{"type":35,"tag":247,"props":624,"children":625},{"style":280},[626],{"type":41,"value":322},{"type":35,"tag":247,"props":628,"children":629},{"style":254},[630],{"type":41,"value":327},{"type":35,"tag":247,"props":632,"children":633},{"style":280},[634],{"type":41,"value":332},{"type":35,"tag":247,"props":636,"children":637},{"style":254},[638],{"type":41,"value":337},{"type":35,"tag":247,"props":640,"children":641},{"style":280},[642],{"type":41,"value":643}," DateTimeOffset.UtcNow;\n",{"type":35,"tag":247,"props":645,"children":647},{"class":249,"line":646},10,[648],{"type":35,"tag":247,"props":649,"children":650},{"style":280},[651],{"type":41,"value":652},"}\n",{"type":35,"tag":44,"props":654,"children":655},{},[656,658,664],{"type":41,"value":657},"Using ",{"type":35,"tag":194,"props":659,"children":661},{"className":660},[],[662],{"type":41,"value":663},"sealed record",{"type":41,"value":665}," gives you value equality, immutability, and non-nullable init-only properties enforced by the compiler.",{"type":35,"tag":36,"props":667,"children":669},{"id":668},"publishing-events-the-outbox-pattern",[670],{"type":41,"value":671},"Publishing Events: The Outbox Pattern",{"type":35,"tag":44,"props":673,"children":674},{},[675],{"type":41,"value":676},"The most common event-driven bug is a partial failure: the order is saved to the database, but the event publish fails—or worse, the event is published before the database transaction commits.",{"type":35,"tag":44,"props":678,"children":679},{},[680,682,687],{"type":41,"value":681},"The ",{"type":35,"tag":105,"props":683,"children":684},{},[685],{"type":41,"value":686},"outbox pattern",{"type":41,"value":688}," solves this by making event publishing part of the database transaction:",{"type":35,"tag":237,"props":690,"children":692},{"className":239,"code":691,"language":241,"meta":7,"style":7},"public class OutboxEventPublisher : IEventPublisher\n{\n    private readonly AppDbContext _db;\n\n    public async Task PublishAsync\u003CT>(T @event, CancellationToken ct = default)\n        where T : class\n    {\n        // Stored atomically with the business data in the same transaction\n        _db.OutboxMessages.Add(new OutboxMessage\n        {\n            Id = Guid.NewGuid(),\n            EventType = typeof(T).AssemblyQualifiedName!,\n            Payload = JsonSerializer.Serialize(@event),\n            CreatedAt = DateTimeOffset.UtcNow,\n            Status = OutboxStatus.Pending\n        });\n        // Caller calls SaveChangesAsync() — outbox row commits with the business data\n    }\n}\n",[693],{"type":35,"tag":194,"props":694,"children":695},{"__ignoreMap":7},[696,723,730,757,766,841,863,871,880,908,916,942,983,1011,1029,1047,1056,1065,1074],{"type":35,"tag":247,"props":697,"children":698},{"class":249,"line":250},[699,703,708,713,718],{"type":35,"tag":247,"props":700,"children":701},{"style":254},[702],{"type":41,"value":257},{"type":35,"tag":247,"props":704,"children":705},{"style":254},[706],{"type":41,"value":707}," class",{"type":35,"tag":247,"props":709,"children":710},{"style":270},[711],{"type":41,"value":712}," OutboxEventPublisher",{"type":35,"tag":247,"props":714,"children":715},{"style":280},[716],{"type":41,"value":717}," : ",{"type":35,"tag":247,"props":719,"children":720},{"style":270},[721],{"type":41,"value":722},"IEventPublisher\n",{"type":35,"tag":247,"props":724,"children":725},{"class":249,"line":276},[726],{"type":35,"tag":247,"props":727,"children":728},{"style":280},[729],{"type":41,"value":283},{"type":35,"tag":247,"props":731,"children":732},{"class":249,"line":286},[733,738,743,748,753],{"type":35,"tag":247,"props":734,"children":735},{"style":254},[736],{"type":41,"value":737},"    private",{"type":35,"tag":247,"props":739,"children":740},{"style":254},[741],{"type":41,"value":742}," readonly",{"type":35,"tag":247,"props":744,"children":745},{"style":270},[746],{"type":41,"value":747}," AppDbContext",{"type":35,"tag":247,"props":749,"children":750},{"style":270},[751],{"type":41,"value":752}," _db",{"type":35,"tag":247,"props":754,"children":755},{"style":280},[756],{"type":41,"value":409},{"type":35,"tag":247,"props":758,"children":759},{"class":249,"line":355},[760],{"type":35,"tag":247,"props":761,"children":763},{"emptyLinePlaceholder":762},true,[764],{"type":41,"value":765},"\n",{"type":35,"tag":247,"props":767,"children":768},{"class":249,"line":412},[769,773,778,783,788,792,797,802,806,811,816,821,826,831,836],{"type":35,"tag":247,"props":770,"children":771},{"style":254},[772],{"type":41,"value":292},{"type":35,"tag":247,"props":774,"children":775},{"style":254},[776],{"type":41,"value":777}," async",{"type":35,"tag":247,"props":779,"children":780},{"style":270},[781],{"type":41,"value":782}," Task",{"type":35,"tag":247,"props":784,"children":785},{"style":270},[786],{"type":41,"value":787}," PublishAsync",{"type":35,"tag":247,"props":789,"children":790},{"style":280},[791],{"type":41,"value":515},{"type":35,"tag":247,"props":793,"children":794},{"style":270},[795],{"type":41,"value":796},"T",{"type":35,"tag":247,"props":798,"children":799},{"style":280},[800],{"type":41,"value":801},">(",{"type":35,"tag":247,"props":803,"children":804},{"style":270},[805],{"type":41,"value":796},{"type":35,"tag":247,"props":807,"children":808},{"style":270},[809],{"type":41,"value":810}," @event",{"type":35,"tag":247,"props":812,"children":813},{"style":280},[814],{"type":41,"value":815},", ",{"type":35,"tag":247,"props":817,"children":818},{"style":270},[819],{"type":41,"value":820},"CancellationToken",{"type":35,"tag":247,"props":822,"children":823},{"style":270},[824],{"type":41,"value":825}," ct",{"type":35,"tag":247,"props":827,"children":828},{"style":254},[829],{"type":41,"value":830}," =",{"type":35,"tag":247,"props":832,"children":833},{"style":254},[834],{"type":41,"value":835}," default",{"type":35,"tag":247,"props":837,"children":838},{"style":280},[839],{"type":41,"value":840},")\n",{"type":35,"tag":247,"props":842,"children":843},{"class":249,"line":454},[844,849,854,858],{"type":35,"tag":247,"props":845,"children":846},{"style":254},[847],{"type":41,"value":848},"        where",{"type":35,"tag":247,"props":850,"children":851},{"style":270},[852],{"type":41,"value":853}," T",{"type":35,"tag":247,"props":855,"children":856},{"style":280},[857],{"type":41,"value":717},{"type":35,"tag":247,"props":859,"children":860},{"style":254},[861],{"type":41,"value":862},"class\n",{"type":35,"tag":247,"props":864,"children":865},{"class":249,"line":496},[866],{"type":35,"tag":247,"props":867,"children":868},{"style":280},[869],{"type":41,"value":870},"    {\n",{"type":35,"tag":247,"props":872,"children":873},{"class":249,"line":553},[874],{"type":35,"tag":247,"props":875,"children":877},{"style":876},"--shiki-default:#6A737D",[878],{"type":41,"value":879},"        // Stored atomically with the business data in the same transaction\n",{"type":35,"tag":247,"props":881,"children":882},{"class":249,"line":595},[883,888,893,898,903],{"type":35,"tag":247,"props":884,"children":885},{"style":280},[886],{"type":41,"value":887},"        _db.OutboxMessages.",{"type":35,"tag":247,"props":889,"children":890},{"style":270},[891],{"type":41,"value":892},"Add",{"type":35,"tag":247,"props":894,"children":895},{"style":280},[896],{"type":41,"value":897},"(",{"type":35,"tag":247,"props":899,"children":900},{"style":254},[901],{"type":41,"value":902},"new",{"type":35,"tag":247,"props":904,"children":905},{"style":270},[906],{"type":41,"value":907}," OutboxMessage\n",{"type":35,"tag":247,"props":909,"children":910},{"class":249,"line":646},[911],{"type":35,"tag":247,"props":912,"children":913},{"style":280},[914],{"type":41,"value":915},"        {\n",{"type":35,"tag":247,"props":917,"children":919},{"class":249,"line":918},11,[920,925,929,933,937],{"type":35,"tag":247,"props":921,"children":922},{"style":280},[923],{"type":41,"value":924},"            Id ",{"type":35,"tag":247,"props":926,"children":927},{"style":254},[928],{"type":41,"value":337},{"type":35,"tag":247,"props":930,"children":931},{"style":280},[932],{"type":41,"value":342},{"type":35,"tag":247,"props":934,"children":935},{"style":270},[936],{"type":41,"value":347},{"type":35,"tag":247,"props":938,"children":939},{"style":280},[940],{"type":41,"value":941},"(),\n",{"type":35,"tag":247,"props":943,"children":945},{"class":249,"line":944},12,[946,951,955,960,964,968,973,978],{"type":35,"tag":247,"props":947,"children":948},{"style":280},[949],{"type":41,"value":950},"            EventType ",{"type":35,"tag":247,"props":952,"children":953},{"style":254},[954],{"type":41,"value":337},{"type":35,"tag":247,"props":956,"children":957},{"style":254},[958],{"type":41,"value":959}," typeof",{"type":35,"tag":247,"props":961,"children":962},{"style":280},[963],{"type":41,"value":897},{"type":35,"tag":247,"props":965,"children":966},{"style":270},[967],{"type":41,"value":796},{"type":35,"tag":247,"props":969,"children":970},{"style":280},[971],{"type":41,"value":972},").AssemblyQualifiedName",{"type":35,"tag":247,"props":974,"children":975},{"style":254},[976],{"type":41,"value":977},"!",{"type":35,"tag":247,"props":979,"children":980},{"style":280},[981],{"type":41,"value":982},",\n",{"type":35,"tag":247,"props":984,"children":986},{"class":249,"line":985},13,[987,992,996,1001,1006],{"type":35,"tag":247,"props":988,"children":989},{"style":280},[990],{"type":41,"value":991},"            Payload ",{"type":35,"tag":247,"props":993,"children":994},{"style":254},[995],{"type":41,"value":337},{"type":35,"tag":247,"props":997,"children":998},{"style":280},[999],{"type":41,"value":1000}," JsonSerializer.",{"type":35,"tag":247,"props":1002,"children":1003},{"style":270},[1004],{"type":41,"value":1005},"Serialize",{"type":35,"tag":247,"props":1007,"children":1008},{"style":280},[1009],{"type":41,"value":1010},"(@event),\n",{"type":35,"tag":247,"props":1012,"children":1014},{"class":249,"line":1013},14,[1015,1020,1024],{"type":35,"tag":247,"props":1016,"children":1017},{"style":280},[1018],{"type":41,"value":1019},"            CreatedAt ",{"type":35,"tag":247,"props":1021,"children":1022},{"style":254},[1023],{"type":41,"value":337},{"type":35,"tag":247,"props":1025,"children":1026},{"style":280},[1027],{"type":41,"value":1028}," DateTimeOffset.UtcNow,\n",{"type":35,"tag":247,"props":1030,"children":1032},{"class":249,"line":1031},15,[1033,1038,1042],{"type":35,"tag":247,"props":1034,"children":1035},{"style":280},[1036],{"type":41,"value":1037},"            Status ",{"type":35,"tag":247,"props":1039,"children":1040},{"style":254},[1041],{"type":41,"value":337},{"type":35,"tag":247,"props":1043,"children":1044},{"style":280},[1045],{"type":41,"value":1046}," OutboxStatus.Pending\n",{"type":35,"tag":247,"props":1048,"children":1050},{"class":249,"line":1049},16,[1051],{"type":35,"tag":247,"props":1052,"children":1053},{"style":280},[1054],{"type":41,"value":1055},"        });\n",{"type":35,"tag":247,"props":1057,"children":1059},{"class":249,"line":1058},17,[1060],{"type":35,"tag":247,"props":1061,"children":1062},{"style":876},[1063],{"type":41,"value":1064},"        // Caller calls SaveChangesAsync() — outbox row commits with the business data\n",{"type":35,"tag":247,"props":1066,"children":1068},{"class":249,"line":1067},18,[1069],{"type":35,"tag":247,"props":1070,"children":1071},{"style":280},[1072],{"type":41,"value":1073},"    }\n",{"type":35,"tag":247,"props":1075,"children":1077},{"class":249,"line":1076},19,[1078],{"type":35,"tag":247,"props":1079,"children":1080},{"style":280},[1081],{"type":41,"value":652},{"type":35,"tag":44,"props":1083,"children":1084},{},[1085],{"type":41,"value":1086},"A background worker (or Azure Function on a timer) reads pending outbox messages and publishes them to Service Bus:",{"type":35,"tag":237,"props":1088,"children":1090},{"className":239,"code":1089,"language":241,"meta":7,"style":7},"public class OutboxProcessor(AppDbContext db, ServiceBusSender sender) : BackgroundService\n{\n    protected override async Task ExecuteAsync(CancellationToken ct)\n    {\n        while (!ct.IsCancellationRequested)\n        {\n            var pending = await db.OutboxMessages\n                .Where(m => m.Status == OutboxStatus.Pending)\n                .OrderBy(m => m.CreatedAt)\n                .Take(20)\n                .ToListAsync(ct);\n\n            foreach (var msg in pending)\n            {\n                await sender.SendMessageAsync(new ServiceBusMessage(msg.Payload)\n                {\n                    ContentType = \"application/json\",\n                    Subject = msg.EventType,\n                    MessageId = msg.Id.ToString()\n                }, ct);\n\n                msg.Status = OutboxStatus.Published;\n                msg.PublishedAt = DateTimeOffset.UtcNow;\n            }\n\n            await db.SaveChangesAsync(ct);\n            await Task.Delay(TimeSpan.FromSeconds(5), ct);\n        }\n    }\n}\n",[1091],{"type":35,"tag":194,"props":1092,"children":1093},{"__ignoreMap":7},[1094,1148,1155,1197,1204,1226,1233,1260,1302,1331,1356,1373,1380,1412,1420,1456,1464,1486,1503,1530,1539,1547,1565,1582,1591,1599,1622,1664,1673,1681],{"type":35,"tag":247,"props":1095,"children":1096},{"class":249,"line":250},[1097,1101,1105,1110,1114,1119,1124,1128,1133,1138,1143],{"type":35,"tag":247,"props":1098,"children":1099},{"style":254},[1100],{"type":41,"value":257},{"type":35,"tag":247,"props":1102,"children":1103},{"style":254},[1104],{"type":41,"value":707},{"type":35,"tag":247,"props":1106,"children":1107},{"style":270},[1108],{"type":41,"value":1109}," OutboxProcessor",{"type":35,"tag":247,"props":1111,"children":1112},{"style":280},[1113],{"type":41,"value":897},{"type":35,"tag":247,"props":1115,"children":1116},{"style":270},[1117],{"type":41,"value":1118},"AppDbContext",{"type":35,"tag":247,"props":1120,"children":1121},{"style":270},[1122],{"type":41,"value":1123}," db",{"type":35,"tag":247,"props":1125,"children":1126},{"style":280},[1127],{"type":41,"value":815},{"type":35,"tag":247,"props":1129,"children":1130},{"style":270},[1131],{"type":41,"value":1132},"ServiceBusSender",{"type":35,"tag":247,"props":1134,"children":1135},{"style":270},[1136],{"type":41,"value":1137}," sender",{"type":35,"tag":247,"props":1139,"children":1140},{"style":280},[1141],{"type":41,"value":1142},") : ",{"type":35,"tag":247,"props":1144,"children":1145},{"style":270},[1146],{"type":41,"value":1147},"BackgroundService\n",{"type":35,"tag":247,"props":1149,"children":1150},{"class":249,"line":276},[1151],{"type":35,"tag":247,"props":1152,"children":1153},{"style":280},[1154],{"type":41,"value":283},{"type":35,"tag":247,"props":1156,"children":1157},{"class":249,"line":286},[1158,1163,1168,1172,1176,1181,1185,1189,1193],{"type":35,"tag":247,"props":1159,"children":1160},{"style":254},[1161],{"type":41,"value":1162},"    protected",{"type":35,"tag":247,"props":1164,"children":1165},{"style":254},[1166],{"type":41,"value":1167}," override",{"type":35,"tag":247,"props":1169,"children":1170},{"style":254},[1171],{"type":41,"value":777},{"type":35,"tag":247,"props":1173,"children":1174},{"style":270},[1175],{"type":41,"value":782},{"type":35,"tag":247,"props":1177,"children":1178},{"style":270},[1179],{"type":41,"value":1180}," ExecuteAsync",{"type":35,"tag":247,"props":1182,"children":1183},{"style":280},[1184],{"type":41,"value":897},{"type":35,"tag":247,"props":1186,"children":1187},{"style":270},[1188],{"type":41,"value":820},{"type":35,"tag":247,"props":1190,"children":1191},{"style":270},[1192],{"type":41,"value":825},{"type":35,"tag":247,"props":1194,"children":1195},{"style":280},[1196],{"type":41,"value":840},{"type":35,"tag":247,"props":1198,"children":1199},{"class":249,"line":355},[1200],{"type":35,"tag":247,"props":1201,"children":1202},{"style":280},[1203],{"type":41,"value":870},{"type":35,"tag":247,"props":1205,"children":1206},{"class":249,"line":412},[1207,1212,1217,1221],{"type":35,"tag":247,"props":1208,"children":1209},{"style":254},[1210],{"type":41,"value":1211},"        while",{"type":35,"tag":247,"props":1213,"children":1214},{"style":280},[1215],{"type":41,"value":1216}," (",{"type":35,"tag":247,"props":1218,"children":1219},{"style":254},[1220],{"type":41,"value":977},{"type":35,"tag":247,"props":1222,"children":1223},{"style":280},[1224],{"type":41,"value":1225},"ct.IsCancellationRequested)\n",{"type":35,"tag":247,"props":1227,"children":1228},{"class":249,"line":454},[1229],{"type":35,"tag":247,"props":1230,"children":1231},{"style":280},[1232],{"type":41,"value":915},{"type":35,"tag":247,"props":1234,"children":1235},{"class":249,"line":496},[1236,1241,1246,1250,1255],{"type":35,"tag":247,"props":1237,"children":1238},{"style":254},[1239],{"type":41,"value":1240},"            var",{"type":35,"tag":247,"props":1242,"children":1243},{"style":270},[1244],{"type":41,"value":1245}," pending",{"type":35,"tag":247,"props":1247,"children":1248},{"style":254},[1249],{"type":41,"value":830},{"type":35,"tag":247,"props":1251,"children":1252},{"style":254},[1253],{"type":41,"value":1254}," await",{"type":35,"tag":247,"props":1256,"children":1257},{"style":280},[1258],{"type":41,"value":1259}," db.OutboxMessages\n",{"type":35,"tag":247,"props":1261,"children":1262},{"class":249,"line":553},[1263,1268,1273,1277,1282,1287,1292,1297],{"type":35,"tag":247,"props":1264,"children":1265},{"style":280},[1266],{"type":41,"value":1267},"                .",{"type":35,"tag":247,"props":1269,"children":1270},{"style":270},[1271],{"type":41,"value":1272},"Where",{"type":35,"tag":247,"props":1274,"children":1275},{"style":280},[1276],{"type":41,"value":897},{"type":35,"tag":247,"props":1278,"children":1279},{"style":270},[1280],{"type":41,"value":1281},"m",{"type":35,"tag":247,"props":1283,"children":1284},{"style":254},[1285],{"type":41,"value":1286}," =>",{"type":35,"tag":247,"props":1288,"children":1289},{"style":280},[1290],{"type":41,"value":1291}," m.Status ",{"type":35,"tag":247,"props":1293,"children":1294},{"style":254},[1295],{"type":41,"value":1296},"==",{"type":35,"tag":247,"props":1298,"children":1299},{"style":280},[1300],{"type":41,"value":1301}," OutboxStatus.Pending)\n",{"type":35,"tag":247,"props":1303,"children":1304},{"class":249,"line":595},[1305,1309,1314,1318,1322,1326],{"type":35,"tag":247,"props":1306,"children":1307},{"style":280},[1308],{"type":41,"value":1267},{"type":35,"tag":247,"props":1310,"children":1311},{"style":270},[1312],{"type":41,"value":1313},"OrderBy",{"type":35,"tag":247,"props":1315,"children":1316},{"style":280},[1317],{"type":41,"value":897},{"type":35,"tag":247,"props":1319,"children":1320},{"style":270},[1321],{"type":41,"value":1281},{"type":35,"tag":247,"props":1323,"children":1324},{"style":254},[1325],{"type":41,"value":1286},{"type":35,"tag":247,"props":1327,"children":1328},{"style":280},[1329],{"type":41,"value":1330}," m.CreatedAt)\n",{"type":35,"tag":247,"props":1332,"children":1333},{"class":249,"line":646},[1334,1338,1343,1347,1352],{"type":35,"tag":247,"props":1335,"children":1336},{"style":280},[1337],{"type":41,"value":1267},{"type":35,"tag":247,"props":1339,"children":1340},{"style":270},[1341],{"type":41,"value":1342},"Take",{"type":35,"tag":247,"props":1344,"children":1345},{"style":280},[1346],{"type":41,"value":897},{"type":35,"tag":247,"props":1348,"children":1349},{"style":401},[1350],{"type":41,"value":1351},"20",{"type":35,"tag":247,"props":1353,"children":1354},{"style":280},[1355],{"type":41,"value":840},{"type":35,"tag":247,"props":1357,"children":1358},{"class":249,"line":918},[1359,1363,1368],{"type":35,"tag":247,"props":1360,"children":1361},{"style":280},[1362],{"type":41,"value":1267},{"type":35,"tag":247,"props":1364,"children":1365},{"style":270},[1366],{"type":41,"value":1367},"ToListAsync",{"type":35,"tag":247,"props":1369,"children":1370},{"style":280},[1371],{"type":41,"value":1372},"(ct);\n",{"type":35,"tag":247,"props":1374,"children":1375},{"class":249,"line":944},[1376],{"type":35,"tag":247,"props":1377,"children":1378},{"emptyLinePlaceholder":762},[1379],{"type":41,"value":765},{"type":35,"tag":247,"props":1381,"children":1382},{"class":249,"line":985},[1383,1388,1392,1397,1402,1407],{"type":35,"tag":247,"props":1384,"children":1385},{"style":254},[1386],{"type":41,"value":1387},"            foreach",{"type":35,"tag":247,"props":1389,"children":1390},{"style":280},[1391],{"type":41,"value":1216},{"type":35,"tag":247,"props":1393,"children":1394},{"style":254},[1395],{"type":41,"value":1396},"var",{"type":35,"tag":247,"props":1398,"children":1399},{"style":270},[1400],{"type":41,"value":1401}," msg",{"type":35,"tag":247,"props":1403,"children":1404},{"style":254},[1405],{"type":41,"value":1406}," in",{"type":35,"tag":247,"props":1408,"children":1409},{"style":280},[1410],{"type":41,"value":1411}," pending)\n",{"type":35,"tag":247,"props":1413,"children":1414},{"class":249,"line":1013},[1415],{"type":35,"tag":247,"props":1416,"children":1417},{"style":280},[1418],{"type":41,"value":1419},"            {\n",{"type":35,"tag":247,"props":1421,"children":1422},{"class":249,"line":1031},[1423,1428,1433,1438,1442,1446,1451],{"type":35,"tag":247,"props":1424,"children":1425},{"style":254},[1426],{"type":41,"value":1427},"                await",{"type":35,"tag":247,"props":1429,"children":1430},{"style":280},[1431],{"type":41,"value":1432}," sender.",{"type":35,"tag":247,"props":1434,"children":1435},{"style":270},[1436],{"type":41,"value":1437},"SendMessageAsync",{"type":35,"tag":247,"props":1439,"children":1440},{"style":280},[1441],{"type":41,"value":897},{"type":35,"tag":247,"props":1443,"children":1444},{"style":254},[1445],{"type":41,"value":902},{"type":35,"tag":247,"props":1447,"children":1448},{"style":270},[1449],{"type":41,"value":1450}," ServiceBusMessage",{"type":35,"tag":247,"props":1452,"children":1453},{"style":280},[1454],{"type":41,"value":1455},"(msg.Payload)\n",{"type":35,"tag":247,"props":1457,"children":1458},{"class":249,"line":1049},[1459],{"type":35,"tag":247,"props":1460,"children":1461},{"style":280},[1462],{"type":41,"value":1463},"                {\n",{"type":35,"tag":247,"props":1465,"children":1466},{"class":249,"line":1058},[1467,1472,1476,1482],{"type":35,"tag":247,"props":1468,"children":1469},{"style":280},[1470],{"type":41,"value":1471},"                    ContentType ",{"type":35,"tag":247,"props":1473,"children":1474},{"style":254},[1475],{"type":41,"value":337},{"type":35,"tag":247,"props":1477,"children":1479},{"style":1478},"--shiki-default:#032F62",[1480],{"type":41,"value":1481}," \"application/json\"",{"type":35,"tag":247,"props":1483,"children":1484},{"style":280},[1485],{"type":41,"value":982},{"type":35,"tag":247,"props":1487,"children":1488},{"class":249,"line":1067},[1489,1494,1498],{"type":35,"tag":247,"props":1490,"children":1491},{"style":280},[1492],{"type":41,"value":1493},"                    Subject ",{"type":35,"tag":247,"props":1495,"children":1496},{"style":254},[1497],{"type":41,"value":337},{"type":35,"tag":247,"props":1499,"children":1500},{"style":280},[1501],{"type":41,"value":1502}," msg.EventType,\n",{"type":35,"tag":247,"props":1504,"children":1505},{"class":249,"line":1076},[1506,1511,1515,1520,1525],{"type":35,"tag":247,"props":1507,"children":1508},{"style":280},[1509],{"type":41,"value":1510},"                    MessageId ",{"type":35,"tag":247,"props":1512,"children":1513},{"style":254},[1514],{"type":41,"value":337},{"type":35,"tag":247,"props":1516,"children":1517},{"style":280},[1518],{"type":41,"value":1519}," msg.Id.",{"type":35,"tag":247,"props":1521,"children":1522},{"style":270},[1523],{"type":41,"value":1524},"ToString",{"type":35,"tag":247,"props":1526,"children":1527},{"style":280},[1528],{"type":41,"value":1529},"()\n",{"type":35,"tag":247,"props":1531,"children":1533},{"class":249,"line":1532},20,[1534],{"type":35,"tag":247,"props":1535,"children":1536},{"style":280},[1537],{"type":41,"value":1538},"                }, ct);\n",{"type":35,"tag":247,"props":1540,"children":1542},{"class":249,"line":1541},21,[1543],{"type":35,"tag":247,"props":1544,"children":1545},{"emptyLinePlaceholder":762},[1546],{"type":41,"value":765},{"type":35,"tag":247,"props":1548,"children":1550},{"class":249,"line":1549},22,[1551,1556,1560],{"type":35,"tag":247,"props":1552,"children":1553},{"style":280},[1554],{"type":41,"value":1555},"                msg.Status ",{"type":35,"tag":247,"props":1557,"children":1558},{"style":254},[1559],{"type":41,"value":337},{"type":35,"tag":247,"props":1561,"children":1562},{"style":280},[1563],{"type":41,"value":1564}," OutboxStatus.Published;\n",{"type":35,"tag":247,"props":1566,"children":1568},{"class":249,"line":1567},23,[1569,1574,1578],{"type":35,"tag":247,"props":1570,"children":1571},{"style":280},[1572],{"type":41,"value":1573},"                msg.PublishedAt ",{"type":35,"tag":247,"props":1575,"children":1576},{"style":254},[1577],{"type":41,"value":337},{"type":35,"tag":247,"props":1579,"children":1580},{"style":280},[1581],{"type":41,"value":643},{"type":35,"tag":247,"props":1583,"children":1585},{"class":249,"line":1584},24,[1586],{"type":35,"tag":247,"props":1587,"children":1588},{"style":280},[1589],{"type":41,"value":1590},"            }\n",{"type":35,"tag":247,"props":1592,"children":1594},{"class":249,"line":1593},25,[1595],{"type":35,"tag":247,"props":1596,"children":1597},{"emptyLinePlaceholder":762},[1598],{"type":41,"value":765},{"type":35,"tag":247,"props":1600,"children":1602},{"class":249,"line":1601},26,[1603,1608,1613,1618],{"type":35,"tag":247,"props":1604,"children":1605},{"style":254},[1606],{"type":41,"value":1607},"            await",{"type":35,"tag":247,"props":1609,"children":1610},{"style":280},[1611],{"type":41,"value":1612}," db.",{"type":35,"tag":247,"props":1614,"children":1615},{"style":270},[1616],{"type":41,"value":1617},"SaveChangesAsync",{"type":35,"tag":247,"props":1619,"children":1620},{"style":280},[1621],{"type":41,"value":1372},{"type":35,"tag":247,"props":1623,"children":1625},{"class":249,"line":1624},27,[1626,1630,1635,1640,1645,1650,1654,1659],{"type":35,"tag":247,"props":1627,"children":1628},{"style":254},[1629],{"type":41,"value":1607},{"type":35,"tag":247,"props":1631,"children":1632},{"style":280},[1633],{"type":41,"value":1634}," Task.",{"type":35,"tag":247,"props":1636,"children":1637},{"style":270},[1638],{"type":41,"value":1639},"Delay",{"type":35,"tag":247,"props":1641,"children":1642},{"style":280},[1643],{"type":41,"value":1644},"(TimeSpan.",{"type":35,"tag":247,"props":1646,"children":1647},{"style":270},[1648],{"type":41,"value":1649},"FromSeconds",{"type":35,"tag":247,"props":1651,"children":1652},{"style":280},[1653],{"type":41,"value":897},{"type":35,"tag":247,"props":1655,"children":1656},{"style":401},[1657],{"type":41,"value":1658},"5",{"type":35,"tag":247,"props":1660,"children":1661},{"style":280},[1662],{"type":41,"value":1663},"), ct);\n",{"type":35,"tag":247,"props":1665,"children":1667},{"class":249,"line":1666},28,[1668],{"type":35,"tag":247,"props":1669,"children":1670},{"style":280},[1671],{"type":41,"value":1672},"        }\n",{"type":35,"tag":247,"props":1674,"children":1676},{"class":249,"line":1675},29,[1677],{"type":35,"tag":247,"props":1678,"children":1679},{"style":280},[1680],{"type":41,"value":1073},{"type":35,"tag":247,"props":1682,"children":1684},{"class":249,"line":1683},30,[1685],{"type":35,"tag":247,"props":1686,"children":1687},{"style":280},[1688],{"type":41,"value":652},{"type":35,"tag":44,"props":1690,"children":1691},{},[1692,1694,1699,1701,1706],{"type":41,"value":1693},"This pattern guarantees ",{"type":35,"tag":105,"props":1695,"children":1696},{},[1697],{"type":41,"value":1698},"exactly-once delivery",{"type":41,"value":1700}," (combined with idempotent consumers) and ",{"type":35,"tag":105,"props":1702,"children":1703},{},[1704],{"type":41,"value":1705},"at-least-once delivery",{"type":41,"value":1707}," even if the application crashes mid-publish.",{"type":35,"tag":36,"props":1709,"children":1711},{"id":1710},"consuming-events-with-azure-functions",[1712],{"type":41,"value":1713},"Consuming Events with Azure Functions",{"type":35,"tag":44,"props":1715,"children":1716},{},[1717],{"type":41,"value":1718},"Azure Functions with Service Bus triggers are a natural fit for event consumers—serverless, auto-scaling, and with built-in retry and dead-letter handling:",{"type":35,"tag":237,"props":1720,"children":1722},{"className":239,"code":1721,"language":241,"meta":7,"style":7},"public class OrderFulfillmentHandler(IInventoryService inventory, INotificationService notify)\n{\n    [Function(\"HandleOrderPlaced\")]\n    public async Task RunAsync(\n        [ServiceBusTrigger(\"orders.placed\", \"fulfillment-sub\",\n            Connection = \"ServiceBusConnection\")]\n        ServiceBusReceivedMessage message,\n        ServiceBusMessageActions actions)\n    {\n        var @event = JsonSerializer.Deserialize\u003COrderPlacedEvent>(message.Body)!;\n\n        try\n        {\n            await inventory.AllocateStockAsync(@event.Items);\n            await notify.SendOrderConfirmationAsync(@event.CustomerId, @event.OrderId);\n\n            // Explicitly complete — message removed from queue\n            await actions.CompleteMessageAsync(message);\n        }\n        catch (InsufficientStockException ex)\n        {\n            // Business-logic failure: dead-letter with reason, don't retry\n            await actions.DeadLetterMessageAsync(message,\n                deadLetterReason: \"InsufficientStock\",\n                deadLetterErrorDescription: ex.Message);\n        }\n        // Transient failures (network, DB unavailable) throw and trigger automatic retry\n    }\n}\n",[1723],{"type":35,"tag":194,"props":1724,"children":1725},{"__ignoreMap":7},[1726,1774,1781,1808,1833,1868,1889,1906,1923,1930,1977,1984,1992,1999,2021,2043,2050,2058,2080,2087,2113,2120,2128,2149,2171,2184,2191,2199,2206],{"type":35,"tag":247,"props":1727,"children":1728},{"class":249,"line":250},[1729,1733,1737,1742,1746,1751,1756,1760,1765,1770],{"type":35,"tag":247,"props":1730,"children":1731},{"style":254},[1732],{"type":41,"value":257},{"type":35,"tag":247,"props":1734,"children":1735},{"style":254},[1736],{"type":41,"value":707},{"type":35,"tag":247,"props":1738,"children":1739},{"style":270},[1740],{"type":41,"value":1741}," OrderFulfillmentHandler",{"type":35,"tag":247,"props":1743,"children":1744},{"style":280},[1745],{"type":41,"value":897},{"type":35,"tag":247,"props":1747,"children":1748},{"style":270},[1749],{"type":41,"value":1750},"IInventoryService",{"type":35,"tag":247,"props":1752,"children":1753},{"style":270},[1754],{"type":41,"value":1755}," inventory",{"type":35,"tag":247,"props":1757,"children":1758},{"style":280},[1759],{"type":41,"value":815},{"type":35,"tag":247,"props":1761,"children":1762},{"style":270},[1763],{"type":41,"value":1764},"INotificationService",{"type":35,"tag":247,"props":1766,"children":1767},{"style":270},[1768],{"type":41,"value":1769}," notify",{"type":35,"tag":247,"props":1771,"children":1772},{"style":280},[1773],{"type":41,"value":840},{"type":35,"tag":247,"props":1775,"children":1776},{"class":249,"line":276},[1777],{"type":35,"tag":247,"props":1778,"children":1779},{"style":280},[1780],{"type":41,"value":283},{"type":35,"tag":247,"props":1782,"children":1783},{"class":249,"line":286},[1784,1789,1794,1798,1803],{"type":35,"tag":247,"props":1785,"children":1786},{"style":280},[1787],{"type":41,"value":1788},"    [",{"type":35,"tag":247,"props":1790,"children":1791},{"style":270},[1792],{"type":41,"value":1793},"Function",{"type":35,"tag":247,"props":1795,"children":1796},{"style":280},[1797],{"type":41,"value":897},{"type":35,"tag":247,"props":1799,"children":1800},{"style":1478},[1801],{"type":41,"value":1802},"\"HandleOrderPlaced\"",{"type":35,"tag":247,"props":1804,"children":1805},{"style":280},[1806],{"type":41,"value":1807},")]\n",{"type":35,"tag":247,"props":1809,"children":1810},{"class":249,"line":355},[1811,1815,1819,1823,1828],{"type":35,"tag":247,"props":1812,"children":1813},{"style":254},[1814],{"type":41,"value":292},{"type":35,"tag":247,"props":1816,"children":1817},{"style":254},[1818],{"type":41,"value":777},{"type":35,"tag":247,"props":1820,"children":1821},{"style":270},[1822],{"type":41,"value":782},{"type":35,"tag":247,"props":1824,"children":1825},{"style":270},[1826],{"type":41,"value":1827}," RunAsync",{"type":35,"tag":247,"props":1829,"children":1830},{"style":280},[1831],{"type":41,"value":1832},"(\n",{"type":35,"tag":247,"props":1834,"children":1835},{"class":249,"line":412},[1836,1841,1846,1850,1855,1859,1864],{"type":35,"tag":247,"props":1837,"children":1838},{"style":280},[1839],{"type":41,"value":1840},"        [",{"type":35,"tag":247,"props":1842,"children":1843},{"style":270},[1844],{"type":41,"value":1845},"ServiceBusTrigger",{"type":35,"tag":247,"props":1847,"children":1848},{"style":280},[1849],{"type":41,"value":897},{"type":35,"tag":247,"props":1851,"children":1852},{"style":1478},[1853],{"type":41,"value":1854},"\"orders.placed\"",{"type":35,"tag":247,"props":1856,"children":1857},{"style":280},[1858],{"type":41,"value":815},{"type":35,"tag":247,"props":1860,"children":1861},{"style":1478},[1862],{"type":41,"value":1863},"\"fulfillment-sub\"",{"type":35,"tag":247,"props":1865,"children":1866},{"style":280},[1867],{"type":41,"value":982},{"type":35,"tag":247,"props":1869,"children":1870},{"class":249,"line":454},[1871,1876,1880,1885],{"type":35,"tag":247,"props":1872,"children":1873},{"style":270},[1874],{"type":41,"value":1875},"            Connection",{"type":35,"tag":247,"props":1877,"children":1878},{"style":254},[1879],{"type":41,"value":830},{"type":35,"tag":247,"props":1881,"children":1882},{"style":1478},[1883],{"type":41,"value":1884}," \"ServiceBusConnection\"",{"type":35,"tag":247,"props":1886,"children":1887},{"style":280},[1888],{"type":41,"value":1807},{"type":35,"tag":247,"props":1890,"children":1891},{"class":249,"line":496},[1892,1897,1902],{"type":35,"tag":247,"props":1893,"children":1894},{"style":270},[1895],{"type":41,"value":1896},"        ServiceBusReceivedMessage",{"type":35,"tag":247,"props":1898,"children":1899},{"style":270},[1900],{"type":41,"value":1901}," message",{"type":35,"tag":247,"props":1903,"children":1904},{"style":280},[1905],{"type":41,"value":982},{"type":35,"tag":247,"props":1907,"children":1908},{"class":249,"line":553},[1909,1914,1919],{"type":35,"tag":247,"props":1910,"children":1911},{"style":270},[1912],{"type":41,"value":1913},"        ServiceBusMessageActions",{"type":35,"tag":247,"props":1915,"children":1916},{"style":270},[1917],{"type":41,"value":1918}," actions",{"type":35,"tag":247,"props":1920,"children":1921},{"style":280},[1922],{"type":41,"value":840},{"type":35,"tag":247,"props":1924,"children":1925},{"class":249,"line":595},[1926],{"type":35,"tag":247,"props":1927,"children":1928},{"style":280},[1929],{"type":41,"value":870},{"type":35,"tag":247,"props":1931,"children":1932},{"class":249,"line":646},[1933,1938,1942,1946,1950,1955,1959,1964,1969,1973],{"type":35,"tag":247,"props":1934,"children":1935},{"style":254},[1936],{"type":41,"value":1937},"        var",{"type":35,"tag":247,"props":1939,"children":1940},{"style":270},[1941],{"type":41,"value":810},{"type":35,"tag":247,"props":1943,"children":1944},{"style":254},[1945],{"type":41,"value":830},{"type":35,"tag":247,"props":1947,"children":1948},{"style":280},[1949],{"type":41,"value":1000},{"type":35,"tag":247,"props":1951,"children":1952},{"style":270},[1953],{"type":41,"value":1954},"Deserialize",{"type":35,"tag":247,"props":1956,"children":1957},{"style":280},[1958],{"type":41,"value":515},{"type":35,"tag":247,"props":1960,"children":1961},{"style":270},[1962],{"type":41,"value":1963},"OrderPlacedEvent",{"type":35,"tag":247,"props":1965,"children":1966},{"style":280},[1967],{"type":41,"value":1968},">(message.Body)",{"type":35,"tag":247,"props":1970,"children":1971},{"style":254},[1972],{"type":41,"value":977},{"type":35,"tag":247,"props":1974,"children":1975},{"style":280},[1976],{"type":41,"value":409},{"type":35,"tag":247,"props":1978,"children":1979},{"class":249,"line":918},[1980],{"type":35,"tag":247,"props":1981,"children":1982},{"emptyLinePlaceholder":762},[1983],{"type":41,"value":765},{"type":35,"tag":247,"props":1985,"children":1986},{"class":249,"line":944},[1987],{"type":35,"tag":247,"props":1988,"children":1989},{"style":254},[1990],{"type":41,"value":1991},"        try\n",{"type":35,"tag":247,"props":1993,"children":1994},{"class":249,"line":985},[1995],{"type":35,"tag":247,"props":1996,"children":1997},{"style":280},[1998],{"type":41,"value":915},{"type":35,"tag":247,"props":2000,"children":2001},{"class":249,"line":1013},[2002,2006,2011,2016],{"type":35,"tag":247,"props":2003,"children":2004},{"style":254},[2005],{"type":41,"value":1607},{"type":35,"tag":247,"props":2007,"children":2008},{"style":280},[2009],{"type":41,"value":2010}," inventory.",{"type":35,"tag":247,"props":2012,"children":2013},{"style":270},[2014],{"type":41,"value":2015},"AllocateStockAsync",{"type":35,"tag":247,"props":2017,"children":2018},{"style":280},[2019],{"type":41,"value":2020},"(@event.Items);\n",{"type":35,"tag":247,"props":2022,"children":2023},{"class":249,"line":1031},[2024,2028,2033,2038],{"type":35,"tag":247,"props":2025,"children":2026},{"style":254},[2027],{"type":41,"value":1607},{"type":35,"tag":247,"props":2029,"children":2030},{"style":280},[2031],{"type":41,"value":2032}," notify.",{"type":35,"tag":247,"props":2034,"children":2035},{"style":270},[2036],{"type":41,"value":2037},"SendOrderConfirmationAsync",{"type":35,"tag":247,"props":2039,"children":2040},{"style":280},[2041],{"type":41,"value":2042},"(@event.CustomerId, @event.OrderId);\n",{"type":35,"tag":247,"props":2044,"children":2045},{"class":249,"line":1049},[2046],{"type":35,"tag":247,"props":2047,"children":2048},{"emptyLinePlaceholder":762},[2049],{"type":41,"value":765},{"type":35,"tag":247,"props":2051,"children":2052},{"class":249,"line":1058},[2053],{"type":35,"tag":247,"props":2054,"children":2055},{"style":876},[2056],{"type":41,"value":2057},"            // Explicitly complete — message removed from queue\n",{"type":35,"tag":247,"props":2059,"children":2060},{"class":249,"line":1067},[2061,2065,2070,2075],{"type":35,"tag":247,"props":2062,"children":2063},{"style":254},[2064],{"type":41,"value":1607},{"type":35,"tag":247,"props":2066,"children":2067},{"style":280},[2068],{"type":41,"value":2069}," actions.",{"type":35,"tag":247,"props":2071,"children":2072},{"style":270},[2073],{"type":41,"value":2074},"CompleteMessageAsync",{"type":35,"tag":247,"props":2076,"children":2077},{"style":280},[2078],{"type":41,"value":2079},"(message);\n",{"type":35,"tag":247,"props":2081,"children":2082},{"class":249,"line":1076},[2083],{"type":35,"tag":247,"props":2084,"children":2085},{"style":280},[2086],{"type":41,"value":1672},{"type":35,"tag":247,"props":2088,"children":2089},{"class":249,"line":1532},[2090,2095,2099,2104,2109],{"type":35,"tag":247,"props":2091,"children":2092},{"style":254},[2093],{"type":41,"value":2094},"        catch",{"type":35,"tag":247,"props":2096,"children":2097},{"style":280},[2098],{"type":41,"value":1216},{"type":35,"tag":247,"props":2100,"children":2101},{"style":270},[2102],{"type":41,"value":2103},"InsufficientStockException",{"type":35,"tag":247,"props":2105,"children":2106},{"style":270},[2107],{"type":41,"value":2108}," ex",{"type":35,"tag":247,"props":2110,"children":2111},{"style":280},[2112],{"type":41,"value":840},{"type":35,"tag":247,"props":2114,"children":2115},{"class":249,"line":1541},[2116],{"type":35,"tag":247,"props":2117,"children":2118},{"style":280},[2119],{"type":41,"value":915},{"type":35,"tag":247,"props":2121,"children":2122},{"class":249,"line":1549},[2123],{"type":35,"tag":247,"props":2124,"children":2125},{"style":876},[2126],{"type":41,"value":2127},"            // Business-logic failure: dead-letter with reason, don't retry\n",{"type":35,"tag":247,"props":2129,"children":2130},{"class":249,"line":1567},[2131,2135,2139,2144],{"type":35,"tag":247,"props":2132,"children":2133},{"style":254},[2134],{"type":41,"value":1607},{"type":35,"tag":247,"props":2136,"children":2137},{"style":280},[2138],{"type":41,"value":2069},{"type":35,"tag":247,"props":2140,"children":2141},{"style":270},[2142],{"type":41,"value":2143},"DeadLetterMessageAsync",{"type":35,"tag":247,"props":2145,"children":2146},{"style":280},[2147],{"type":41,"value":2148},"(message,\n",{"type":35,"tag":247,"props":2150,"children":2151},{"class":249,"line":1584},[2152,2157,2162,2167],{"type":35,"tag":247,"props":2153,"children":2154},{"style":270},[2155],{"type":41,"value":2156},"                deadLetterReason",{"type":35,"tag":247,"props":2158,"children":2159},{"style":280},[2160],{"type":41,"value":2161},": ",{"type":35,"tag":247,"props":2163,"children":2164},{"style":1478},[2165],{"type":41,"value":2166},"\"InsufficientStock\"",{"type":35,"tag":247,"props":2168,"children":2169},{"style":280},[2170],{"type":41,"value":982},{"type":35,"tag":247,"props":2172,"children":2173},{"class":249,"line":1593},[2174,2179],{"type":35,"tag":247,"props":2175,"children":2176},{"style":270},[2177],{"type":41,"value":2178},"                deadLetterErrorDescription",{"type":35,"tag":247,"props":2180,"children":2181},{"style":280},[2182],{"type":41,"value":2183},": ex.Message);\n",{"type":35,"tag":247,"props":2185,"children":2186},{"class":249,"line":1601},[2187],{"type":35,"tag":247,"props":2188,"children":2189},{"style":280},[2190],{"type":41,"value":1672},{"type":35,"tag":247,"props":2192,"children":2193},{"class":249,"line":1624},[2194],{"type":35,"tag":247,"props":2195,"children":2196},{"style":876},[2197],{"type":41,"value":2198},"        // Transient failures (network, DB unavailable) throw and trigger automatic retry\n",{"type":35,"tag":247,"props":2200,"children":2201},{"class":249,"line":1666},[2202],{"type":35,"tag":247,"props":2203,"children":2204},{"style":280},[2205],{"type":41,"value":1073},{"type":35,"tag":247,"props":2207,"children":2208},{"class":249,"line":1675},[2209],{"type":35,"tag":247,"props":2210,"children":2211},{"style":280},[2212],{"type":41,"value":652},{"type":35,"tag":44,"props":2214,"children":2215},{},[2216],{"type":41,"value":2217},"The distinction between dead-lettering and throwing matters. Dead-letter for business failures you've handled. Throw for transient failures you want the Service Bus retry policy to handle.",{"type":35,"tag":36,"props":2219,"children":2221},{"id":2220},"retry-policies-and-resilience",[2222],{"type":41,"value":2223},"Retry Policies and Resilience",{"type":35,"tag":44,"props":2225,"children":2226},{},[2227],{"type":41,"value":2228},"Configure Service Bus retry at the client level and layer Polly for downstream HTTP calls:",{"type":35,"tag":237,"props":2230,"children":2232},{"className":239,"code":2231,"language":241,"meta":7,"style":7},"// Service Bus client — built-in retry with exponential backoff\nservices.AddSingleton(_ =>\n    new ServiceBusClient(\n        connectionString,\n        new ServiceBusClientOptions\n        {\n            RetryOptions = new ServiceBusRetryOptions\n            {\n                Mode = ServiceBusRetryMode.Exponential,\n                MaxRetries = 5,\n                Delay = TimeSpan.FromSeconds(1),\n                MaxDelay = TimeSpan.FromSeconds(60)\n            }\n        }));\n\n// Polly pipeline for HTTP calls inside consumers\nservices.AddHttpClient\u003CIInventoryClient, InventoryClient>()\n    .AddResilienceHandler(\"inventory\", builder =>\n    {\n        builder.AddRetry(new HttpRetryStrategyOptions\n        {\n            BackoffType = DelayBackoffType.Exponential,\n            MaxRetryAttempts = 3\n        });\n        builder.AddCircuitBreaker(new HttpCircuitBreakerStrategyOptions\n        {\n            FailureRatio = 0.5,\n            SamplingDuration = TimeSpan.FromSeconds(30),\n            BreakDuration = TimeSpan.FromSeconds(15)\n        });\n        builder.AddTimeout(TimeSpan.FromSeconds(10));\n    });\n",[2233],{"type":35,"tag":194,"props":2234,"children":2235},{"__ignoreMap":7},[2236,2244,2271,2288,2296,2309,2316,2338,2345,2362,2383,2418,2451,2458,2466,2473,2481,2516,2551,2558,2584,2591,2608,2625,2632,2657,2664,2685,2718,2751,2758,2793],{"type":35,"tag":247,"props":2237,"children":2238},{"class":249,"line":250},[2239],{"type":35,"tag":247,"props":2240,"children":2241},{"style":876},[2242],{"type":41,"value":2243},"// Service Bus client — built-in retry with exponential backoff\n",{"type":35,"tag":247,"props":2245,"children":2246},{"class":249,"line":276},[2247,2252,2257,2261,2266],{"type":35,"tag":247,"props":2248,"children":2249},{"style":280},[2250],{"type":41,"value":2251},"services.",{"type":35,"tag":247,"props":2253,"children":2254},{"style":270},[2255],{"type":41,"value":2256},"AddSingleton",{"type":35,"tag":247,"props":2258,"children":2259},{"style":280},[2260],{"type":41,"value":897},{"type":35,"tag":247,"props":2262,"children":2263},{"style":270},[2264],{"type":41,"value":2265},"_",{"type":35,"tag":247,"props":2267,"children":2268},{"style":254},[2269],{"type":41,"value":2270}," =>\n",{"type":35,"tag":247,"props":2272,"children":2273},{"class":249,"line":286},[2274,2279,2284],{"type":35,"tag":247,"props":2275,"children":2276},{"style":254},[2277],{"type":41,"value":2278},"    new",{"type":35,"tag":247,"props":2280,"children":2281},{"style":270},[2282],{"type":41,"value":2283}," ServiceBusClient",{"type":35,"tag":247,"props":2285,"children":2286},{"style":280},[2287],{"type":41,"value":1832},{"type":35,"tag":247,"props":2289,"children":2290},{"class":249,"line":355},[2291],{"type":35,"tag":247,"props":2292,"children":2293},{"style":280},[2294],{"type":41,"value":2295},"        connectionString,\n",{"type":35,"tag":247,"props":2297,"children":2298},{"class":249,"line":412},[2299,2304],{"type":35,"tag":247,"props":2300,"children":2301},{"style":254},[2302],{"type":41,"value":2303},"        new",{"type":35,"tag":247,"props":2305,"children":2306},{"style":270},[2307],{"type":41,"value":2308}," ServiceBusClientOptions\n",{"type":35,"tag":247,"props":2310,"children":2311},{"class":249,"line":454},[2312],{"type":35,"tag":247,"props":2313,"children":2314},{"style":280},[2315],{"type":41,"value":915},{"type":35,"tag":247,"props":2317,"children":2318},{"class":249,"line":496},[2319,2324,2328,2333],{"type":35,"tag":247,"props":2320,"children":2321},{"style":280},[2322],{"type":41,"value":2323},"            RetryOptions ",{"type":35,"tag":247,"props":2325,"children":2326},{"style":254},[2327],{"type":41,"value":337},{"type":35,"tag":247,"props":2329,"children":2330},{"style":254},[2331],{"type":41,"value":2332}," new",{"type":35,"tag":247,"props":2334,"children":2335},{"style":270},[2336],{"type":41,"value":2337}," ServiceBusRetryOptions\n",{"type":35,"tag":247,"props":2339,"children":2340},{"class":249,"line":553},[2341],{"type":35,"tag":247,"props":2342,"children":2343},{"style":280},[2344],{"type":41,"value":1419},{"type":35,"tag":247,"props":2346,"children":2347},{"class":249,"line":595},[2348,2353,2357],{"type":35,"tag":247,"props":2349,"children":2350},{"style":280},[2351],{"type":41,"value":2352},"                Mode ",{"type":35,"tag":247,"props":2354,"children":2355},{"style":254},[2356],{"type":41,"value":337},{"type":35,"tag":247,"props":2358,"children":2359},{"style":280},[2360],{"type":41,"value":2361}," ServiceBusRetryMode.Exponential,\n",{"type":35,"tag":247,"props":2363,"children":2364},{"class":249,"line":646},[2365,2370,2374,2379],{"type":35,"tag":247,"props":2366,"children":2367},{"style":280},[2368],{"type":41,"value":2369},"                MaxRetries ",{"type":35,"tag":247,"props":2371,"children":2372},{"style":254},[2373],{"type":41,"value":337},{"type":35,"tag":247,"props":2375,"children":2376},{"style":401},[2377],{"type":41,"value":2378}," 5",{"type":35,"tag":247,"props":2380,"children":2381},{"style":280},[2382],{"type":41,"value":982},{"type":35,"tag":247,"props":2384,"children":2385},{"class":249,"line":918},[2386,2391,2395,2400,2404,2408,2413],{"type":35,"tag":247,"props":2387,"children":2388},{"style":280},[2389],{"type":41,"value":2390},"                Delay ",{"type":35,"tag":247,"props":2392,"children":2393},{"style":254},[2394],{"type":41,"value":337},{"type":35,"tag":247,"props":2396,"children":2397},{"style":280},[2398],{"type":41,"value":2399}," TimeSpan.",{"type":35,"tag":247,"props":2401,"children":2402},{"style":270},[2403],{"type":41,"value":1649},{"type":35,"tag":247,"props":2405,"children":2406},{"style":280},[2407],{"type":41,"value":897},{"type":35,"tag":247,"props":2409,"children":2410},{"style":401},[2411],{"type":41,"value":2412},"1",{"type":35,"tag":247,"props":2414,"children":2415},{"style":280},[2416],{"type":41,"value":2417},"),\n",{"type":35,"tag":247,"props":2419,"children":2420},{"class":249,"line":944},[2421,2426,2430,2434,2438,2442,2447],{"type":35,"tag":247,"props":2422,"children":2423},{"style":280},[2424],{"type":41,"value":2425},"                MaxDelay ",{"type":35,"tag":247,"props":2427,"children":2428},{"style":254},[2429],{"type":41,"value":337},{"type":35,"tag":247,"props":2431,"children":2432},{"style":280},[2433],{"type":41,"value":2399},{"type":35,"tag":247,"props":2435,"children":2436},{"style":270},[2437],{"type":41,"value":1649},{"type":35,"tag":247,"props":2439,"children":2440},{"style":280},[2441],{"type":41,"value":897},{"type":35,"tag":247,"props":2443,"children":2444},{"style":401},[2445],{"type":41,"value":2446},"60",{"type":35,"tag":247,"props":2448,"children":2449},{"style":280},[2450],{"type":41,"value":840},{"type":35,"tag":247,"props":2452,"children":2453},{"class":249,"line":985},[2454],{"type":35,"tag":247,"props":2455,"children":2456},{"style":280},[2457],{"type":41,"value":1590},{"type":35,"tag":247,"props":2459,"children":2460},{"class":249,"line":1013},[2461],{"type":35,"tag":247,"props":2462,"children":2463},{"style":280},[2464],{"type":41,"value":2465},"        }));\n",{"type":35,"tag":247,"props":2467,"children":2468},{"class":249,"line":1031},[2469],{"type":35,"tag":247,"props":2470,"children":2471},{"emptyLinePlaceholder":762},[2472],{"type":41,"value":765},{"type":35,"tag":247,"props":2474,"children":2475},{"class":249,"line":1049},[2476],{"type":35,"tag":247,"props":2477,"children":2478},{"style":876},[2479],{"type":41,"value":2480},"// Polly pipeline for HTTP calls inside consumers\n",{"type":35,"tag":247,"props":2482,"children":2483},{"class":249,"line":1058},[2484,2488,2493,2497,2502,2506,2511],{"type":35,"tag":247,"props":2485,"children":2486},{"style":280},[2487],{"type":41,"value":2251},{"type":35,"tag":247,"props":2489,"children":2490},{"style":270},[2491],{"type":41,"value":2492},"AddHttpClient",{"type":35,"tag":247,"props":2494,"children":2495},{"style":280},[2496],{"type":41,"value":515},{"type":35,"tag":247,"props":2498,"children":2499},{"style":270},[2500],{"type":41,"value":2501},"IInventoryClient",{"type":35,"tag":247,"props":2503,"children":2504},{"style":280},[2505],{"type":41,"value":815},{"type":35,"tag":247,"props":2507,"children":2508},{"style":270},[2509],{"type":41,"value":2510},"InventoryClient",{"type":35,"tag":247,"props":2512,"children":2513},{"style":280},[2514],{"type":41,"value":2515},">()\n",{"type":35,"tag":247,"props":2517,"children":2518},{"class":249,"line":1067},[2519,2524,2529,2533,2538,2542,2547],{"type":35,"tag":247,"props":2520,"children":2521},{"style":280},[2522],{"type":41,"value":2523},"    .",{"type":35,"tag":247,"props":2525,"children":2526},{"style":270},[2527],{"type":41,"value":2528},"AddResilienceHandler",{"type":35,"tag":247,"props":2530,"children":2531},{"style":280},[2532],{"type":41,"value":897},{"type":35,"tag":247,"props":2534,"children":2535},{"style":1478},[2536],{"type":41,"value":2537},"\"inventory\"",{"type":35,"tag":247,"props":2539,"children":2540},{"style":280},[2541],{"type":41,"value":815},{"type":35,"tag":247,"props":2543,"children":2544},{"style":270},[2545],{"type":41,"value":2546},"builder",{"type":35,"tag":247,"props":2548,"children":2549},{"style":254},[2550],{"type":41,"value":2270},{"type":35,"tag":247,"props":2552,"children":2553},{"class":249,"line":1076},[2554],{"type":35,"tag":247,"props":2555,"children":2556},{"style":280},[2557],{"type":41,"value":870},{"type":35,"tag":247,"props":2559,"children":2560},{"class":249,"line":1532},[2561,2566,2571,2575,2579],{"type":35,"tag":247,"props":2562,"children":2563},{"style":280},[2564],{"type":41,"value":2565},"        builder.",{"type":35,"tag":247,"props":2567,"children":2568},{"style":270},[2569],{"type":41,"value":2570},"AddRetry",{"type":35,"tag":247,"props":2572,"children":2573},{"style":280},[2574],{"type":41,"value":897},{"type":35,"tag":247,"props":2576,"children":2577},{"style":254},[2578],{"type":41,"value":902},{"type":35,"tag":247,"props":2580,"children":2581},{"style":270},[2582],{"type":41,"value":2583}," HttpRetryStrategyOptions\n",{"type":35,"tag":247,"props":2585,"children":2586},{"class":249,"line":1541},[2587],{"type":35,"tag":247,"props":2588,"children":2589},{"style":280},[2590],{"type":41,"value":915},{"type":35,"tag":247,"props":2592,"children":2593},{"class":249,"line":1549},[2594,2599,2603],{"type":35,"tag":247,"props":2595,"children":2596},{"style":280},[2597],{"type":41,"value":2598},"            BackoffType ",{"type":35,"tag":247,"props":2600,"children":2601},{"style":254},[2602],{"type":41,"value":337},{"type":35,"tag":247,"props":2604,"children":2605},{"style":280},[2606],{"type":41,"value":2607}," DelayBackoffType.Exponential,\n",{"type":35,"tag":247,"props":2609,"children":2610},{"class":249,"line":1567},[2611,2616,2620],{"type":35,"tag":247,"props":2612,"children":2613},{"style":280},[2614],{"type":41,"value":2615},"            MaxRetryAttempts ",{"type":35,"tag":247,"props":2617,"children":2618},{"style":254},[2619],{"type":41,"value":337},{"type":35,"tag":247,"props":2621,"children":2622},{"style":401},[2623],{"type":41,"value":2624}," 3\n",{"type":35,"tag":247,"props":2626,"children":2627},{"class":249,"line":1584},[2628],{"type":35,"tag":247,"props":2629,"children":2630},{"style":280},[2631],{"type":41,"value":1055},{"type":35,"tag":247,"props":2633,"children":2634},{"class":249,"line":1593},[2635,2639,2644,2648,2652],{"type":35,"tag":247,"props":2636,"children":2637},{"style":280},[2638],{"type":41,"value":2565},{"type":35,"tag":247,"props":2640,"children":2641},{"style":270},[2642],{"type":41,"value":2643},"AddCircuitBreaker",{"type":35,"tag":247,"props":2645,"children":2646},{"style":280},[2647],{"type":41,"value":897},{"type":35,"tag":247,"props":2649,"children":2650},{"style":254},[2651],{"type":41,"value":902},{"type":35,"tag":247,"props":2653,"children":2654},{"style":270},[2655],{"type":41,"value":2656}," HttpCircuitBreakerStrategyOptions\n",{"type":35,"tag":247,"props":2658,"children":2659},{"class":249,"line":1601},[2660],{"type":35,"tag":247,"props":2661,"children":2662},{"style":280},[2663],{"type":41,"value":915},{"type":35,"tag":247,"props":2665,"children":2666},{"class":249,"line":1624},[2667,2672,2676,2681],{"type":35,"tag":247,"props":2668,"children":2669},{"style":280},[2670],{"type":41,"value":2671},"            FailureRatio ",{"type":35,"tag":247,"props":2673,"children":2674},{"style":254},[2675],{"type":41,"value":337},{"type":35,"tag":247,"props":2677,"children":2678},{"style":401},[2679],{"type":41,"value":2680}," 0.5",{"type":35,"tag":247,"props":2682,"children":2683},{"style":280},[2684],{"type":41,"value":982},{"type":35,"tag":247,"props":2686,"children":2687},{"class":249,"line":1666},[2688,2693,2697,2701,2705,2709,2714],{"type":35,"tag":247,"props":2689,"children":2690},{"style":280},[2691],{"type":41,"value":2692},"            SamplingDuration ",{"type":35,"tag":247,"props":2694,"children":2695},{"style":254},[2696],{"type":41,"value":337},{"type":35,"tag":247,"props":2698,"children":2699},{"style":280},[2700],{"type":41,"value":2399},{"type":35,"tag":247,"props":2702,"children":2703},{"style":270},[2704],{"type":41,"value":1649},{"type":35,"tag":247,"props":2706,"children":2707},{"style":280},[2708],{"type":41,"value":897},{"type":35,"tag":247,"props":2710,"children":2711},{"style":401},[2712],{"type":41,"value":2713},"30",{"type":35,"tag":247,"props":2715,"children":2716},{"style":280},[2717],{"type":41,"value":2417},{"type":35,"tag":247,"props":2719,"children":2720},{"class":249,"line":1675},[2721,2726,2730,2734,2738,2742,2747],{"type":35,"tag":247,"props":2722,"children":2723},{"style":280},[2724],{"type":41,"value":2725},"            BreakDuration ",{"type":35,"tag":247,"props":2727,"children":2728},{"style":254},[2729],{"type":41,"value":337},{"type":35,"tag":247,"props":2731,"children":2732},{"style":280},[2733],{"type":41,"value":2399},{"type":35,"tag":247,"props":2735,"children":2736},{"style":270},[2737],{"type":41,"value":1649},{"type":35,"tag":247,"props":2739,"children":2740},{"style":280},[2741],{"type":41,"value":897},{"type":35,"tag":247,"props":2743,"children":2744},{"style":401},[2745],{"type":41,"value":2746},"15",{"type":35,"tag":247,"props":2748,"children":2749},{"style":280},[2750],{"type":41,"value":840},{"type":35,"tag":247,"props":2752,"children":2753},{"class":249,"line":1683},[2754],{"type":35,"tag":247,"props":2755,"children":2756},{"style":280},[2757],{"type":41,"value":1055},{"type":35,"tag":247,"props":2759,"children":2761},{"class":249,"line":2760},31,[2762,2766,2771,2775,2779,2783,2788],{"type":35,"tag":247,"props":2763,"children":2764},{"style":280},[2765],{"type":41,"value":2565},{"type":35,"tag":247,"props":2767,"children":2768},{"style":270},[2769],{"type":41,"value":2770},"AddTimeout",{"type":35,"tag":247,"props":2772,"children":2773},{"style":280},[2774],{"type":41,"value":1644},{"type":35,"tag":247,"props":2776,"children":2777},{"style":270},[2778],{"type":41,"value":1649},{"type":35,"tag":247,"props":2780,"children":2781},{"style":280},[2782],{"type":41,"value":897},{"type":35,"tag":247,"props":2784,"children":2785},{"style":401},[2786],{"type":41,"value":2787},"10",{"type":35,"tag":247,"props":2789,"children":2790},{"style":280},[2791],{"type":41,"value":2792},"));\n",{"type":35,"tag":247,"props":2794,"children":2796},{"class":249,"line":2795},32,[2797],{"type":35,"tag":247,"props":2798,"children":2799},{"style":280},[2800],{"type":41,"value":2801},"    });\n",{"type":35,"tag":36,"props":2803,"children":2805},{"id":2804},"distributed-tracing-with-opentelemetry",[2806],{"type":41,"value":2807},"Distributed Tracing with OpenTelemetry",{"type":35,"tag":44,"props":2809,"children":2810},{},[2811],{"type":41,"value":2812},"Debugging event-driven systems without tracing is nearly impossible — a failed order could have touched six services before the error surface. Wire up OpenTelemetry from the start:",{"type":35,"tag":237,"props":2814,"children":2816},{"className":239,"code":2815,"language":241,"meta":7,"style":7},"builder.Services.AddOpenTelemetry()\n    .WithTracing(tracing => tracing\n        .AddAspNetCoreInstrumentation()\n        .AddHttpClientInstrumentation()\n        .AddAzureMonitorTraceExporter());   // Ships to Application Insights\n",[2817],{"type":35,"tag":194,"props":2818,"children":2819},{"__ignoreMap":7},[2820,2837,2867,2884,2900],{"type":35,"tag":247,"props":2821,"children":2822},{"class":249,"line":250},[2823,2828,2833],{"type":35,"tag":247,"props":2824,"children":2825},{"style":280},[2826],{"type":41,"value":2827},"builder.Services.",{"type":35,"tag":247,"props":2829,"children":2830},{"style":270},[2831],{"type":41,"value":2832},"AddOpenTelemetry",{"type":35,"tag":247,"props":2834,"children":2835},{"style":280},[2836],{"type":41,"value":1529},{"type":35,"tag":247,"props":2838,"children":2839},{"class":249,"line":276},[2840,2844,2849,2853,2858,2862],{"type":35,"tag":247,"props":2841,"children":2842},{"style":280},[2843],{"type":41,"value":2523},{"type":35,"tag":247,"props":2845,"children":2846},{"style":270},[2847],{"type":41,"value":2848},"WithTracing",{"type":35,"tag":247,"props":2850,"children":2851},{"style":280},[2852],{"type":41,"value":897},{"type":35,"tag":247,"props":2854,"children":2855},{"style":270},[2856],{"type":41,"value":2857},"tracing",{"type":35,"tag":247,"props":2859,"children":2860},{"style":254},[2861],{"type":41,"value":1286},{"type":35,"tag":247,"props":2863,"children":2864},{"style":280},[2865],{"type":41,"value":2866}," tracing\n",{"type":35,"tag":247,"props":2868,"children":2869},{"class":249,"line":286},[2870,2875,2880],{"type":35,"tag":247,"props":2871,"children":2872},{"style":280},[2873],{"type":41,"value":2874},"        .",{"type":35,"tag":247,"props":2876,"children":2877},{"style":270},[2878],{"type":41,"value":2879},"AddAspNetCoreInstrumentation",{"type":35,"tag":247,"props":2881,"children":2882},{"style":280},[2883],{"type":41,"value":1529},{"type":35,"tag":247,"props":2885,"children":2886},{"class":249,"line":355},[2887,2891,2896],{"type":35,"tag":247,"props":2888,"children":2889},{"style":280},[2890],{"type":41,"value":2874},{"type":35,"tag":247,"props":2892,"children":2893},{"style":270},[2894],{"type":41,"value":2895},"AddHttpClientInstrumentation",{"type":35,"tag":247,"props":2897,"children":2898},{"style":280},[2899],{"type":41,"value":1529},{"type":35,"tag":247,"props":2901,"children":2902},{"class":249,"line":412},[2903,2907,2912,2917],{"type":35,"tag":247,"props":2904,"children":2905},{"style":280},[2906],{"type":41,"value":2874},{"type":35,"tag":247,"props":2908,"children":2909},{"style":270},[2910],{"type":41,"value":2911},"AddAzureMonitorTraceExporter",{"type":35,"tag":247,"props":2913,"children":2914},{"style":280},[2915],{"type":41,"value":2916},"());   ",{"type":35,"tag":247,"props":2918,"children":2919},{"style":876},[2920],{"type":41,"value":2921},"// Ships to Application Insights\n",{"type":35,"tag":44,"props":2923,"children":2924},{},[2925],{"type":41,"value":2926},"Every Service Bus message automatically propagates the trace context when you use the Azure.Messaging.ServiceBus SDK — no manual correlation IDs needed. In Azure Monitor, you'll see the complete end-to-end call graph from HTTP request through every event handler.",{"type":35,"tag":36,"props":2928,"children":2930},{"id":2929},"when-not-to-use-event-driven",[2931],{"type":41,"value":2932},"When NOT to Use Event-Driven",{"type":35,"tag":44,"props":2934,"children":2935},{},[2936],{"type":41,"value":2937},"Event-driven architecture adds operational complexity. Don't reach for it by default:",{"type":35,"tag":2939,"props":2940,"children":2941},"ul",{},[2942,2952,2962],{"type":35,"tag":183,"props":2943,"children":2944},{},[2945,2950],{"type":35,"tag":105,"props":2946,"children":2947},{},[2948],{"type":41,"value":2949},"Synchronous queries",{"type":41,"value":2951}," — if you need a response immediately (e.g., \"is this username taken?\"), use HTTP",{"type":35,"tag":183,"props":2953,"children":2954},{},[2955,2960],{"type":35,"tag":105,"props":2956,"children":2957},{},[2958],{"type":41,"value":2959},"Simple CRUD services",{"type":41,"value":2961}," — events solve coordination problems between services; within a single service, they add noise",{"type":35,"tag":183,"props":2963,"children":2964},{},[2965,2970],{"type":35,"tag":105,"props":2966,"children":2967},{},[2968],{"type":41,"value":2969},"Small teams / low scale",{"type":41,"value":2971}," — the overhead of outbox tables, dead-letter queues, and schema versioning isn't worth it until you have multiple services that genuinely need decoupling",{"type":35,"tag":44,"props":2973,"children":2974},{},[2975],{"type":41,"value":2976},"The pattern shines when you have independent bounded contexts that change at different rates and need to communicate without tight coupling. Start with REST, extract events when the coupling pain becomes real.",{"type":35,"tag":2978,"props":2979,"children":2980},"style",{},[2981],{"type":41,"value":2982},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":286,"depth":286,"links":2984},[2985,2986,2987,2988,2989,2990,2991,2992],{"id":38,"depth":276,"text":42},{"id":56,"depth":276,"text":59},{"id":169,"depth":276,"text":172},{"id":668,"depth":276,"text":671},{"id":1710,"depth":276,"text":1713},{"id":2220,"depth":276,"text":2223},{"id":2804,"depth":276,"text":2807},{"id":2929,"depth":276,"text":2932},"markdown","content:blog:event-driven-dotnet-azure.md","content","blog/event-driven-dotnet-azure.md","blog/event-driven-dotnet-azure","md",[3000,3649,5773],{"_path":3001,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":3002,"description":3003,"slug":3004,"date":3005,"readTime":3006,"category":30,"image":3007,"imageCaption":3008,"author":3009,"tags":3011,"body":3015,"_type":2993,"_id":3646,"_source":2995,"_file":3647,"_stem":3648,"_extension":2998},"/blog/azure-architecture-patterns","Scalable Azure Architecture Patterns Every Cloud Engineer Should Know in 2025","Explore the proven Azure architecture patterns—from Container Apps microservices to multi-region high availability—that MediaFront uses to build resilient, cost-efficient cloud applications.","azure-architecture-patterns","2025-04-10","10 min","https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1200&h=600&fit=crop&auto=format","Azure cloud infrastructure supporting modern microservices at global scale",{"name":17,"role":18,"avatar":19,"bio":20,"social":3010},{"github":22,"twitter":23,"linkedin":24},[27,3012,29,3013,3014],"Cloud Architecture","Containers","DevOps",{"type":32,"children":3016,"toc":3635},[3017,3023,3028,3034,3039,3044,3087,3092,3100,3105,3111,3116,3121,3206,3211,3217,3222,3255,3260,3266,3271,3323,3328,3334,3339,3347,3352,3358,3363,3406,3412,3417,3559,3572,3578,3583,3626,3631],{"type":35,"tag":36,"props":3018,"children":3020},{"id":3019},"why-azure-architecture-decisions-matter-more-than-ever",[3021],{"type":41,"value":3022},"Why Azure Architecture Decisions Matter More Than Ever",{"type":35,"tag":44,"props":3024,"children":3025},{},[3026],{"type":41,"value":3027},"Choosing the wrong architecture pattern on Azure can cost a company thousands of euros per month in wasted compute and dozens of engineering hours untangling bottlenecks. Choose well, and you get an application that scales automatically, stays resilient under pressure, and grows with your business. This guide covers the five patterns we deploy most frequently at MediaFront and why each one earns its place in a modern cloud stack.",{"type":35,"tag":36,"props":3029,"children":3031},{"id":3030},"microservices-with-azure-container-apps",[3032],{"type":41,"value":3033},"Microservices with Azure Container Apps",{"type":35,"tag":44,"props":3035,"children":3036},{},[3037],{"type":41,"value":3038},"Azure Container Apps is the sweet spot between the simplicity of App Service and the raw power of AKS. It runs your containers on a serverless runtime, so you pay only for what you use while gaining all the benefits of orchestration.",{"type":35,"tag":44,"props":3040,"children":3041},{},[3042],{"type":41,"value":3043},"Key capabilities that matter in production:",{"type":35,"tag":2939,"props":3045,"children":3046},{},[3047,3057,3067,3077],{"type":35,"tag":183,"props":3048,"children":3049},{},[3050,3055],{"type":35,"tag":105,"props":3051,"children":3052},{},[3053],{"type":41,"value":3054},"HTTP and event-driven scaling",{"type":41,"value":3056}," — scale a service to zero when idle, spike to hundreds of replicas during peak load without a single YAML manifest change",{"type":35,"tag":183,"props":3058,"children":3059},{},[3060,3065],{"type":35,"tag":105,"props":3061,"children":3062},{},[3063],{"type":41,"value":3064},"Revision management",{"type":41,"value":3066}," — deploy a new version, split traffic 90/10 between old and new, then cut over once telemetry confirms stability",{"type":35,"tag":183,"props":3068,"children":3069},{},[3070,3075],{"type":35,"tag":105,"props":3071,"children":3072},{},[3073],{"type":41,"value":3074},"Built-in service-to-service communication",{"type":41,"value":3076}," via Dapr sidecars, removing the networking boilerplate you'd otherwise write by hand",{"type":35,"tag":183,"props":3078,"children":3079},{},[3080,3085],{"type":35,"tag":105,"props":3081,"children":3082},{},[3083],{"type":41,"value":3084},"gRPC and WebSocket support",{"type":41,"value":3086}," — not just REST",{"type":35,"tag":44,"props":3088,"children":3089},{},[3090],{"type":41,"value":3091},"A typical three-tier architecture we ship looks like this:",{"type":35,"tag":237,"props":3093,"children":3095},{"code":3094},"Azure API Management\n  ├── Auth Service        (Container App — scales to 0 at night)\n  ├── Catalogue Service   (Container App — scales 1–20 replicas)\n  │     └── Azure Cosmos DB (multi-region writes)\n  ├── Order Service       (Container App)\n  │     └── Azure SQL     (zone-redundant)\n  └── Notification Service (Container App)\n        └── Azure Service Bus (Standard tier)\n",[3096],{"type":35,"tag":194,"props":3097,"children":3098},{"__ignoreMap":7},[3099],{"type":41,"value":3094},{"type":35,"tag":44,"props":3101,"children":3102},{},[3103],{"type":41,"value":3104},"Each service owns its data store and communicates through well-defined contracts. Teams can deploy independently, and a failure in the Notification Service never cascades into the Order Service.",{"type":35,"tag":36,"props":3106,"children":3108},{"id":3107},"event-driven-architecture-with-event-grid-and-functions",[3109],{"type":41,"value":3110},"Event-Driven Architecture with Event Grid and Functions",{"type":35,"tag":44,"props":3112,"children":3113},{},[3114],{"type":41,"value":3115},"When your system needs to react to things that happen — a file upload, a payment completing, a sensor reading arriving — an event-driven backbone beats tight REST coupling every time.",{"type":35,"tag":44,"props":3117,"children":3118},{},[3119],{"type":41,"value":3120},"Azure gives you three complementary messaging primitives:",{"type":35,"tag":66,"props":3122,"children":3123},{},[3124,3143],{"type":35,"tag":70,"props":3125,"children":3126},{},[3127],{"type":35,"tag":74,"props":3128,"children":3129},{},[3130,3134,3138],{"type":35,"tag":78,"props":3131,"children":3132},{},[3133],{"type":41,"value":82},{"type":35,"tag":78,"props":3135,"children":3136},{},[3137],{"type":41,"value":92},{"type":35,"tag":78,"props":3139,"children":3140},{},[3141],{"type":41,"value":3142},"Throughput",{"type":35,"tag":94,"props":3144,"children":3145},{},[3146,3166,3186],{"type":35,"tag":74,"props":3147,"children":3148},{},[3149,3156,3161],{"type":35,"tag":101,"props":3150,"children":3151},{},[3152],{"type":35,"tag":105,"props":3153,"children":3154},{},[3155],{"type":41,"value":130},{"type":35,"tag":101,"props":3157,"children":3158},{},[3159],{"type":41,"value":3160},"Reactive routing of discrete events",{"type":35,"tag":101,"props":3162,"children":3163},{},[3164],{"type":41,"value":3165},"Millions/sec",{"type":35,"tag":74,"props":3167,"children":3168},{},[3169,3176,3181],{"type":35,"tag":101,"props":3170,"children":3171},{},[3172],{"type":35,"tag":105,"props":3173,"children":3174},{},[3175],{"type":41,"value":151},{"type":35,"tag":101,"props":3177,"children":3178},{},[3179],{"type":41,"value":3180},"High-volume data streaming and ingestion",{"type":35,"tag":101,"props":3182,"children":3183},{},[3184],{"type":41,"value":3185},"Petabyte-scale",{"type":35,"tag":74,"props":3187,"children":3188},{},[3189,3196,3201],{"type":35,"tag":101,"props":3190,"children":3191},{},[3192],{"type":35,"tag":105,"props":3193,"children":3194},{},[3195],{"type":41,"value":109},{"type":35,"tag":101,"props":3197,"children":3198},{},[3199],{"type":41,"value":3200},"Reliable ordered message delivery",{"type":35,"tag":101,"props":3202,"children":3203},{},[3204],{"type":41,"value":3205},"Enterprise-grade",{"type":35,"tag":44,"props":3207,"children":3208},{},[3209],{"type":41,"value":3210},"The pattern we reach for most: Event Grid as the central event router, Service Bus queues for per-service processing, and Azure Functions as lightweight consumers. The result is a system where adding a new feature means wiring up a new Function—not modifying existing services.",{"type":35,"tag":36,"props":3212,"children":3214},{"id":3213},"global-static-web-apps-edge-functions",[3215],{"type":41,"value":3216},"Global Static Web Apps + Edge Functions",{"type":35,"tag":44,"props":3218,"children":3219},{},[3220],{"type":41,"value":3221},"For marketing sites, SaaS dashboards, and content-heavy applications, the combination of Azure Static Web Apps with Azure Functions delivers exceptional performance at minimal cost:",{"type":35,"tag":2939,"props":3223,"children":3224},{},[3225,3235,3245],{"type":35,"tag":183,"props":3226,"children":3227},{},[3228,3233],{"type":35,"tag":105,"props":3229,"children":3230},{},[3231],{"type":41,"value":3232},"Static Web Apps",{"type":41,"value":3234}," serve pre-rendered HTML, CSS, and JS from Azure's global CDN — Lighthouse scores of 95+ become routine",{"type":35,"tag":183,"props":3236,"children":3237},{},[3238,3243],{"type":35,"tag":105,"props":3239,"children":3240},{},[3241],{"type":41,"value":3242},"Integrated API",{"type":41,"value":3244}," routes live alongside your frontend in the same repository; Azure handles routing automatically",{"type":35,"tag":183,"props":3246,"children":3247},{},[3248,3253],{"type":35,"tag":105,"props":3249,"children":3250},{},[3251],{"type":41,"value":3252},"Azure Front Door",{"type":41,"value":3254}," sits in front as a global entry point, providing WAF, DDoS protection, and sub-10ms SSL termination",{"type":35,"tag":44,"props":3256,"children":3257},{},[3258],{"type":41,"value":3259},"When workloads outgrow Functions, we migrate the API layer to Azure Container Apps without touching the frontend infrastructure.",{"type":35,"tag":36,"props":3261,"children":3263},{"id":3262},"multi-region-high-availability",[3264],{"type":41,"value":3265},"Multi-Region High Availability",{"type":35,"tag":44,"props":3267,"children":3268},{},[3269],{"type":41,"value":3270},"For clients with SLA commitments above 99.9%, a single-region deployment simply isn't enough. Our multi-region blueprint:",{"type":35,"tag":179,"props":3272,"children":3273},{},[3274,3283,3293,3303,3313],{"type":35,"tag":183,"props":3275,"children":3276},{},[3277,3281],{"type":35,"tag":105,"props":3278,"children":3279},{},[3280],{"type":41,"value":3252},{"type":41,"value":3282}," routes users to the closest healthy region via anycast",{"type":35,"tag":183,"props":3284,"children":3285},{},[3286,3291],{"type":35,"tag":105,"props":3287,"children":3288},{},[3289],{"type":41,"value":3290},"Identical application stacks",{"type":41,"value":3292}," in at least two Azure regions (paired regions where possible)",{"type":35,"tag":183,"props":3294,"children":3295},{},[3296,3301],{"type":35,"tag":105,"props":3297,"children":3298},{},[3299],{"type":41,"value":3300},"Cosmos DB multi-region writes",{"type":41,"value":3302}," — data is always written to the user's nearest region",{"type":35,"tag":183,"props":3304,"children":3305},{},[3306,3311],{"type":35,"tag":105,"props":3307,"children":3308},{},[3309],{"type":41,"value":3310},"Azure SQL Geo-Replication",{"type":41,"value":3312}," for relational workloads that need ACID guarantees",{"type":35,"tag":183,"props":3314,"children":3315},{},[3316,3321],{"type":35,"tag":105,"props":3317,"children":3318},{},[3319],{"type":41,"value":3320},"Regular chaos engineering",{"type":41,"value":3322}," — we inject failures in staging to prove the failover actually works",{"type":35,"tag":44,"props":3324,"children":3325},{},[3326],{"type":41,"value":3327},"Active-active for stateless services, active-passive with fast failover for stateful ones. The distinction matters: active-active everywhere sounds great until you need to reconcile conflicting writes.",{"type":35,"tag":36,"props":3329,"children":3331},{"id":3330},"cost-effective-data-processing-with-data-factory-and-synapse",[3332],{"type":41,"value":3333},"Cost-Effective Data Processing with Data Factory and Synapse",{"type":35,"tag":44,"props":3335,"children":3336},{},[3337],{"type":41,"value":3338},"Analytics pipelines don't need to run on expensive always-on compute. Our serverless data architecture:",{"type":35,"tag":237,"props":3340,"children":3342},{"code":3341},"Raw Data Sources → Azure Data Factory (orchestration)\n                       ↓\n                 Azure Blob Storage (cold storage, \u003C €0.02/GB)\n                       ↓\n              Azure Synapse Serverless SQL (query on demand)\n                       ↓\n                    Power BI (embedded reports)\n",[3343],{"type":35,"tag":194,"props":3344,"children":3345},{"__ignoreMap":7},[3346],{"type":41,"value":3341},{"type":35,"tag":44,"props":3348,"children":3349},{},[3350],{"type":41,"value":3351},"Data Factory handles scheduling and movement. Synapse runs complex queries against Parquet files without a warehouse to provision. Power BI surfaces the results to stakeholders. The entire stack scales from zero and costs a fraction of a dedicated data warehouse for most SME use cases.",{"type":35,"tag":36,"props":3353,"children":3355},{"id":3354},"security-zero-trust-from-day-one",[3356],{"type":41,"value":3357},"Security: Zero-Trust from Day One",{"type":35,"tag":44,"props":3359,"children":3360},{},[3361],{"type":41,"value":3362},"Across every architecture pattern above, we apply the same security baseline:",{"type":35,"tag":2939,"props":3364,"children":3365},{},[3366,3376,3386,3396],{"type":35,"tag":183,"props":3367,"children":3368},{},[3369,3374],{"type":35,"tag":105,"props":3370,"children":3371},{},[3372],{"type":41,"value":3373},"Managed Identities",{"type":41,"value":3375}," everywhere — no secrets stored in environment variables or Key Vault references in app settings that could be read by anyone with Contributor access",{"type":35,"tag":183,"props":3377,"children":3378},{},[3379,3384],{"type":35,"tag":105,"props":3380,"children":3381},{},[3382],{"type":41,"value":3383},"Private Endpoints",{"type":41,"value":3385}," for all PaaS services — your Cosmos DB, Service Bus, and Storage accounts should never be reachable from the public internet",{"type":35,"tag":183,"props":3387,"children":3388},{},[3389,3394],{"type":35,"tag":105,"props":3390,"children":3391},{},[3392],{"type":41,"value":3393},"Azure Defender for Cloud",{"type":41,"value":3395}," continuously scanning for misconfiguration",{"type":35,"tag":183,"props":3397,"children":3398},{},[3399,3404],{"type":35,"tag":105,"props":3400,"children":3401},{},[3402],{"type":41,"value":3403},"Key Vault references",{"type":41,"value":3405}," in App Configuration so secrets rotate without redeployment",{"type":35,"tag":36,"props":3407,"children":3409},{"id":3408},"infrastructure-as-code-azure-bicep",[3410],{"type":41,"value":3411},"Infrastructure as Code: Azure Bicep",{"type":35,"tag":44,"props":3413,"children":3414},{},[3415],{"type":41,"value":3416},"Every pattern above is deployed through code, not the portal. We use Azure Bicep for its native Azure integration and superior readability compared to ARM templates:",{"type":35,"tag":237,"props":3418,"children":3422},{"code":3419,"language":3420,"meta":7,"className":3421,"style":7},"resource containerApp 'Microsoft.App/containerApps@2023-05-01' = {\n  name: 'order-service'\n  location: location\n  properties: {\n    configuration: {\n      ingress: { external: false, targetPort: 8080 }\n    }\n    template: {\n      containers: [{\n        name: 'order-service'\n        image: '${acr.name}.azurecr.io/order-service:${imageTag}'\n        resources: { cpu: '0.5', memory: '1Gi' }\n      }]\n      scale: { minReplicas: 1, maxReplicas: 20 }\n    }\n  }\n}\n","bicep","language-bicep shiki shiki-themes github-light",[3423],{"type":35,"tag":194,"props":3424,"children":3425},{"__ignoreMap":7},[3426,3434,3442,3450,3458,3466,3474,3481,3489,3497,3505,3513,3521,3529,3537,3544,3552],{"type":35,"tag":247,"props":3427,"children":3428},{"class":249,"line":250},[3429],{"type":35,"tag":247,"props":3430,"children":3431},{},[3432],{"type":41,"value":3433},"resource containerApp 'Microsoft.App/containerApps@2023-05-01' = {\n",{"type":35,"tag":247,"props":3435,"children":3436},{"class":249,"line":276},[3437],{"type":35,"tag":247,"props":3438,"children":3439},{},[3440],{"type":41,"value":3441},"  name: 'order-service'\n",{"type":35,"tag":247,"props":3443,"children":3444},{"class":249,"line":286},[3445],{"type":35,"tag":247,"props":3446,"children":3447},{},[3448],{"type":41,"value":3449},"  location: location\n",{"type":35,"tag":247,"props":3451,"children":3452},{"class":249,"line":355},[3453],{"type":35,"tag":247,"props":3454,"children":3455},{},[3456],{"type":41,"value":3457},"  properties: {\n",{"type":35,"tag":247,"props":3459,"children":3460},{"class":249,"line":412},[3461],{"type":35,"tag":247,"props":3462,"children":3463},{},[3464],{"type":41,"value":3465},"    configuration: {\n",{"type":35,"tag":247,"props":3467,"children":3468},{"class":249,"line":454},[3469],{"type":35,"tag":247,"props":3470,"children":3471},{},[3472],{"type":41,"value":3473},"      ingress: { external: false, targetPort: 8080 }\n",{"type":35,"tag":247,"props":3475,"children":3476},{"class":249,"line":496},[3477],{"type":35,"tag":247,"props":3478,"children":3479},{},[3480],{"type":41,"value":1073},{"type":35,"tag":247,"props":3482,"children":3483},{"class":249,"line":553},[3484],{"type":35,"tag":247,"props":3485,"children":3486},{},[3487],{"type":41,"value":3488},"    template: {\n",{"type":35,"tag":247,"props":3490,"children":3491},{"class":249,"line":595},[3492],{"type":35,"tag":247,"props":3493,"children":3494},{},[3495],{"type":41,"value":3496},"      containers: [{\n",{"type":35,"tag":247,"props":3498,"children":3499},{"class":249,"line":646},[3500],{"type":35,"tag":247,"props":3501,"children":3502},{},[3503],{"type":41,"value":3504},"        name: 'order-service'\n",{"type":35,"tag":247,"props":3506,"children":3507},{"class":249,"line":918},[3508],{"type":35,"tag":247,"props":3509,"children":3510},{},[3511],{"type":41,"value":3512},"        image: '${acr.name}.azurecr.io/order-service:${imageTag}'\n",{"type":35,"tag":247,"props":3514,"children":3515},{"class":249,"line":944},[3516],{"type":35,"tag":247,"props":3517,"children":3518},{},[3519],{"type":41,"value":3520},"        resources: { cpu: '0.5', memory: '1Gi' }\n",{"type":35,"tag":247,"props":3522,"children":3523},{"class":249,"line":985},[3524],{"type":35,"tag":247,"props":3525,"children":3526},{},[3527],{"type":41,"value":3528},"      }]\n",{"type":35,"tag":247,"props":3530,"children":3531},{"class":249,"line":1013},[3532],{"type":35,"tag":247,"props":3533,"children":3534},{},[3535],{"type":41,"value":3536},"      scale: { minReplicas: 1, maxReplicas: 20 }\n",{"type":35,"tag":247,"props":3538,"children":3539},{"class":249,"line":1031},[3540],{"type":35,"tag":247,"props":3541,"children":3542},{},[3543],{"type":41,"value":1073},{"type":35,"tag":247,"props":3545,"children":3546},{"class":249,"line":1049},[3547],{"type":35,"tag":247,"props":3548,"children":3549},{},[3550],{"type":41,"value":3551},"  }\n",{"type":35,"tag":247,"props":3553,"children":3554},{"class":249,"line":1058},[3555],{"type":35,"tag":247,"props":3556,"children":3557},{},[3558],{"type":41,"value":652},{"type":35,"tag":44,"props":3560,"children":3561},{},[3562,3564,3570],{"type":41,"value":3563},"Version-controlled infrastructure means every environment is reproducible, every change is auditable, and rollbacks are a ",{"type":35,"tag":194,"props":3565,"children":3567},{"className":3566},[],[3568],{"type":41,"value":3569},"git revert",{"type":41,"value":3571}," away.",{"type":35,"tag":36,"props":3573,"children":3575},{"id":3574},"choosing-the-right-pattern",[3576],{"type":41,"value":3577},"Choosing the Right Pattern",{"type":35,"tag":44,"props":3579,"children":3580},{},[3581],{"type":41,"value":3582},"No single pattern fits every project. Use this as a quick guide:",{"type":35,"tag":2939,"props":3584,"children":3585},{},[3586,3596,3606,3616],{"type":35,"tag":183,"props":3587,"children":3588},{},[3589,3594],{"type":35,"tag":105,"props":3590,"children":3591},{},[3592],{"type":41,"value":3593},"Greenfield SaaS product",{"type":41,"value":3595},": Container Apps + Event Grid + Cosmos DB",{"type":35,"tag":183,"props":3597,"children":3598},{},[3599,3604],{"type":35,"tag":105,"props":3600,"children":3601},{},[3602],{"type":41,"value":3603},"Marketing site with dynamic API",{"type":41,"value":3605},": Static Web Apps + Functions + Azure SQL",{"type":35,"tag":183,"props":3607,"children":3608},{},[3609,3614],{"type":35,"tag":105,"props":3610,"children":3611},{},[3612],{"type":41,"value":3613},"Mission-critical transactional system",{"type":41,"value":3615},": Multi-region + Service Bus + SQL Geo-Replication",{"type":35,"tag":183,"props":3617,"children":3618},{},[3619,3624],{"type":35,"tag":105,"props":3620,"children":3621},{},[3622],{"type":41,"value":3623},"Analytics-heavy application",{"type":41,"value":3625},": Data Factory + Synapse Serverless + Power BI",{"type":35,"tag":44,"props":3627,"children":3628},{},[3629],{"type":41,"value":3630},"The best Azure architecture is the one that matches your load profile, your team's operational maturity, and your cost envelope — not the most sophisticated one you can build.",{"type":35,"tag":2978,"props":3632,"children":3633},{},[3634],{"type":41,"value":2982},{"title":7,"searchDepth":286,"depth":286,"links":3636},[3637,3638,3639,3640,3641,3642,3643,3644,3645],{"id":3019,"depth":276,"text":3022},{"id":3030,"depth":276,"text":3033},{"id":3107,"depth":276,"text":3110},{"id":3213,"depth":276,"text":3216},{"id":3262,"depth":276,"text":3265},{"id":3330,"depth":276,"text":3333},{"id":3354,"depth":276,"text":3357},{"id":3408,"depth":276,"text":3411},{"id":3574,"depth":276,"text":3577},"content:blog:azure-architecture-patterns.md","blog/azure-architecture-patterns.md","blog/azure-architecture-patterns",{"_path":3650,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":3651,"description":3652,"slug":3653,"date":3654,"readTime":3655,"category":3014,"image":3656,"imageCaption":3657,"author":3658,"tags":3660,"body":3664,"_type":2993,"_id":5770,"_source":2995,"_file":5771,"_stem":5772,"_extension":2998},"/blog/containerization-guide","Docker & Kubernetes: A Complete Containerization Guide for Production-Ready Apps","From writing your first Dockerfile to orchestrating workloads with Kubernetes—a practical containerization guide covering image optimisation, security, and a real-world case study that cut deployment time from hours to minutes.","containerization-guide","2025-03-28","12 min","https://images.unsplash.com/photo-1605745341112-85968b19335b?w=1200&h=600&fit=crop&auto=format","Container infrastructure running microservices in a production Kubernetes cluster",{"name":17,"role":18,"avatar":19,"bio":20,"social":3659},{"github":22,"twitter":23,"linkedin":24},[3661,3662,3013,3014,3663],"Docker","Kubernetes","Cloud Native",{"type":32,"children":3665,"toc":5755},[3666,3672,3693,3698,3704,3709,3752,3757,3763,3768,3775,3780,3930,3936,3941,4023,4144,4150,4155,4718,4739,4745,4750,4756,4857,4863,5561,5582,5588,5593,5692,5697,5703,5708,5741,5746,5751],{"type":35,"tag":36,"props":3667,"children":3669},{"id":3668},"the-promise-and-the-reality-of-containerisation",[3670],{"type":41,"value":3671},"The Promise (and the Reality) of Containerisation",{"type":35,"tag":44,"props":3673,"children":3674},{},[3675,3677,3683,3685,3691],{"type":41,"value":3676},"Containers solve a problem every developer knows well: ",{"type":35,"tag":3678,"props":3679,"children":3680},"em",{},[3681],{"type":41,"value":3682},"\"it works on my machine.\"",{"type":41,"value":3684}," By packaging an application alongside all its runtime dependencies into a portable, reproducible unit, containers eliminate the friction between development, staging, and production environments. But getting from a working Dockerfile to a resilient, production-ready container strategy requires more than just running ",{"type":35,"tag":194,"props":3686,"children":3688},{"className":3687},[],[3689],{"type":41,"value":3690},"docker build",{"type":41,"value":3692},".",{"type":35,"tag":44,"props":3694,"children":3695},{},[3696],{"type":41,"value":3697},"This guide walks through the full journey—from container fundamentals to Kubernetes orchestration—drawing on patterns we've refined across dozens of client projects at MediaFront.",{"type":35,"tag":36,"props":3699,"children":3701},{"id":3700},"what-containers-actually-are",[3702],{"type":41,"value":3703},"What Containers Actually Are",{"type":35,"tag":44,"props":3705,"children":3706},{},[3707],{"type":41,"value":3708},"Unlike virtual machines, containers don't virtualise hardware. They share the host operating system kernel while running in isolated user-space processes. The practical result:",{"type":35,"tag":2939,"props":3710,"children":3711},{},[3712,3722,3732,3742],{"type":35,"tag":183,"props":3713,"children":3714},{},[3715,3720],{"type":35,"tag":105,"props":3716,"children":3717},{},[3718],{"type":41,"value":3719},"Startup in milliseconds",{"type":41,"value":3721},", not minutes",{"type":35,"tag":183,"props":3723,"children":3724},{},[3725,3730],{"type":35,"tag":105,"props":3726,"children":3727},{},[3728],{"type":41,"value":3729},"Image sizes in megabytes",{"type":41,"value":3731},", not gigabytes",{"type":35,"tag":183,"props":3733,"children":3734},{},[3735,3740],{"type":35,"tag":105,"props":3736,"children":3737},{},[3738],{"type":41,"value":3739},"Predictable resource usage",{"type":41,"value":3741}," — you can set hard CPU and memory limits",{"type":35,"tag":183,"props":3743,"children":3744},{},[3745,3750],{"type":35,"tag":105,"props":3746,"children":3747},{},[3748],{"type":41,"value":3749},"Immutable deployments",{"type":41,"value":3751}," — every release is a new image tag, making rollbacks trivial",{"type":35,"tag":44,"props":3753,"children":3754},{},[3755],{"type":41,"value":3756},"The trade-off: containers on the same host share the kernel, which has security implications we'll address below.",{"type":35,"tag":36,"props":3758,"children":3760},{"id":3759},"writing-production-grade-dockerfiles",[3761],{"type":41,"value":3762},"Writing Production-Grade Dockerfiles",{"type":35,"tag":44,"props":3764,"children":3765},{},[3766],{"type":41,"value":3767},"A Dockerfile is infrastructure as code for your runtime environment. Small choices here have outsized consequences in production.",{"type":35,"tag":3769,"props":3770,"children":3772},"h3",{"id":3771},"use-multi-stage-builds",[3773],{"type":41,"value":3774},"Use Multi-Stage Builds",{"type":35,"tag":44,"props":3776,"children":3777},{},[3778],{"type":41,"value":3779},"Multi-stage builds separate the build toolchain from the runtime image, dramatically reducing final image size and attack surface:",{"type":35,"tag":237,"props":3781,"children":3785},{"className":3782,"code":3783,"language":3784,"meta":7,"style":7},"language-dockerfile shiki shiki-themes github-light","# Stage 1: Build\nFROM mcr.microsoft.com/dotnet/sdk:8.0 AS build\nWORKDIR /src\nCOPY [\"OrderService.csproj\", \"./\"]\nRUN dotnet restore\nCOPY . .\nRUN dotnet publish -c Release -o /app/publish\n\n# Stage 2: Runtime-only image (~100MB vs ~800MB SDK image)\nFROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime\nWORKDIR /app\nEXPOSE 8080\nCOPY --from=build /app/publish .\n\n# Never run as root in production\nUSER app\n\nENTRYPOINT [\"dotnet\", \"OrderService.dll\"]\n","dockerfile",[3786],{"type":35,"tag":194,"props":3787,"children":3788},{"__ignoreMap":7},[3789,3797,3805,3813,3821,3829,3837,3845,3852,3860,3868,3876,3884,3892,3899,3907,3915,3922],{"type":35,"tag":247,"props":3790,"children":3791},{"class":249,"line":250},[3792],{"type":35,"tag":247,"props":3793,"children":3794},{},[3795],{"type":41,"value":3796},"# Stage 1: Build\n",{"type":35,"tag":247,"props":3798,"children":3799},{"class":249,"line":276},[3800],{"type":35,"tag":247,"props":3801,"children":3802},{},[3803],{"type":41,"value":3804},"FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build\n",{"type":35,"tag":247,"props":3806,"children":3807},{"class":249,"line":286},[3808],{"type":35,"tag":247,"props":3809,"children":3810},{},[3811],{"type":41,"value":3812},"WORKDIR /src\n",{"type":35,"tag":247,"props":3814,"children":3815},{"class":249,"line":355},[3816],{"type":35,"tag":247,"props":3817,"children":3818},{},[3819],{"type":41,"value":3820},"COPY [\"OrderService.csproj\", \"./\"]\n",{"type":35,"tag":247,"props":3822,"children":3823},{"class":249,"line":412},[3824],{"type":35,"tag":247,"props":3825,"children":3826},{},[3827],{"type":41,"value":3828},"RUN dotnet restore\n",{"type":35,"tag":247,"props":3830,"children":3831},{"class":249,"line":454},[3832],{"type":35,"tag":247,"props":3833,"children":3834},{},[3835],{"type":41,"value":3836},"COPY . .\n",{"type":35,"tag":247,"props":3838,"children":3839},{"class":249,"line":496},[3840],{"type":35,"tag":247,"props":3841,"children":3842},{},[3843],{"type":41,"value":3844},"RUN dotnet publish -c Release -o /app/publish\n",{"type":35,"tag":247,"props":3846,"children":3847},{"class":249,"line":553},[3848],{"type":35,"tag":247,"props":3849,"children":3850},{"emptyLinePlaceholder":762},[3851],{"type":41,"value":765},{"type":35,"tag":247,"props":3853,"children":3854},{"class":249,"line":595},[3855],{"type":35,"tag":247,"props":3856,"children":3857},{},[3858],{"type":41,"value":3859},"# Stage 2: Runtime-only image (~100MB vs ~800MB SDK image)\n",{"type":35,"tag":247,"props":3861,"children":3862},{"class":249,"line":646},[3863],{"type":35,"tag":247,"props":3864,"children":3865},{},[3866],{"type":41,"value":3867},"FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime\n",{"type":35,"tag":247,"props":3869,"children":3870},{"class":249,"line":918},[3871],{"type":35,"tag":247,"props":3872,"children":3873},{},[3874],{"type":41,"value":3875},"WORKDIR /app\n",{"type":35,"tag":247,"props":3877,"children":3878},{"class":249,"line":944},[3879],{"type":35,"tag":247,"props":3880,"children":3881},{},[3882],{"type":41,"value":3883},"EXPOSE 8080\n",{"type":35,"tag":247,"props":3885,"children":3886},{"class":249,"line":985},[3887],{"type":35,"tag":247,"props":3888,"children":3889},{},[3890],{"type":41,"value":3891},"COPY --from=build /app/publish .\n",{"type":35,"tag":247,"props":3893,"children":3894},{"class":249,"line":1013},[3895],{"type":35,"tag":247,"props":3896,"children":3897},{"emptyLinePlaceholder":762},[3898],{"type":41,"value":765},{"type":35,"tag":247,"props":3900,"children":3901},{"class":249,"line":1031},[3902],{"type":35,"tag":247,"props":3903,"children":3904},{},[3905],{"type":41,"value":3906},"# Never run as root in production\n",{"type":35,"tag":247,"props":3908,"children":3909},{"class":249,"line":1049},[3910],{"type":35,"tag":247,"props":3911,"children":3912},{},[3913],{"type":41,"value":3914},"USER app\n",{"type":35,"tag":247,"props":3916,"children":3917},{"class":249,"line":1058},[3918],{"type":35,"tag":247,"props":3919,"children":3920},{"emptyLinePlaceholder":762},[3921],{"type":41,"value":765},{"type":35,"tag":247,"props":3923,"children":3924},{"class":249,"line":1067},[3925],{"type":35,"tag":247,"props":3926,"children":3927},{},[3928],{"type":41,"value":3929},"ENTRYPOINT [\"dotnet\", \"OrderService.dll\"]\n",{"type":35,"tag":3769,"props":3931,"children":3933},{"id":3932},"security-hardening-checklist",[3934],{"type":41,"value":3935},"Security Hardening Checklist",{"type":35,"tag":44,"props":3937,"children":3938},{},[3939],{"type":41,"value":3940},"Before any image goes to production, verify:",{"type":35,"tag":2939,"props":3942,"children":3943},{},[3944,3962,3972,3988,4013],{"type":35,"tag":183,"props":3945,"children":3946},{},[3947,3952,3954,3960],{"type":35,"tag":105,"props":3948,"children":3949},{},[3950],{"type":41,"value":3951},"Non-root user",{"type":41,"value":3953}," — add ",{"type":35,"tag":194,"props":3955,"children":3957},{"className":3956},[],[3958],{"type":41,"value":3959},"USER app",{"type":41,"value":3961}," (or create a dedicated user) so a compromised container doesn't have root access to the host",{"type":35,"tag":183,"props":3963,"children":3964},{},[3965,3970],{"type":35,"tag":105,"props":3966,"children":3967},{},[3968],{"type":41,"value":3969},"Read-only filesystem",{"type":41,"value":3971}," — mount volumes only where writes are genuinely needed",{"type":35,"tag":183,"props":3973,"children":3974},{},[3975,3980,3982],{"type":35,"tag":105,"props":3976,"children":3977},{},[3978],{"type":41,"value":3979},"No secrets in image layers",{"type":41,"value":3981}," — use build secrets or runtime environment injection, never ",{"type":35,"tag":194,"props":3983,"children":3985},{"className":3984},[],[3986],{"type":41,"value":3987},"COPY .env .",{"type":35,"tag":183,"props":3989,"children":3990},{},[3991,3996,3997,4003,4005,4011],{"type":35,"tag":105,"props":3992,"children":3993},{},[3994],{"type":41,"value":3995},"Pinned base image tags",{"type":41,"value":192},{"type":35,"tag":194,"props":3998,"children":4000},{"className":3999},[],[4001],{"type":41,"value":4002},"FROM node:20.14.0-alpine3.20",{"type":41,"value":4004}," is reproducible; ",{"type":35,"tag":194,"props":4006,"children":4008},{"className":4007},[],[4009],{"type":41,"value":4010},"FROM node:latest",{"type":41,"value":4012}," is a reliability hazard",{"type":35,"tag":183,"props":4014,"children":4015},{},[4016,4021],{"type":35,"tag":105,"props":4017,"children":4018},{},[4019],{"type":41,"value":4020},"Vulnerability scanning",{"type":41,"value":4022}," — integrate Trivy or Grype into your CI pipeline; fail the build on HIGH or CRITICAL findings",{"type":35,"tag":237,"props":4024,"children":4028},{"className":4025,"code":4026,"language":4027,"meta":7,"style":7},"language-yaml shiki shiki-themes github-light","# GitHub Actions step — fails PR if critical CVEs found\n- name: Scan image for vulnerabilities\n  uses: aquasecurity/trivy-action@master\n  with:\n    image-ref: ${{ env.IMAGE }}\n    exit-code: '1'\n    severity: 'CRITICAL,HIGH'\n","yaml",[4029],{"type":35,"tag":194,"props":4030,"children":4031},{"__ignoreMap":7},[4032,4040,4063,4080,4093,4110,4127],{"type":35,"tag":247,"props":4033,"children":4034},{"class":249,"line":250},[4035],{"type":35,"tag":247,"props":4036,"children":4037},{"style":876},[4038],{"type":41,"value":4039},"# GitHub Actions step — fails PR if critical CVEs found\n",{"type":35,"tag":247,"props":4041,"children":4042},{"class":249,"line":276},[4043,4048,4054,4058],{"type":35,"tag":247,"props":4044,"children":4045},{"style":280},[4046],{"type":41,"value":4047},"- ",{"type":35,"tag":247,"props":4049,"children":4051},{"style":4050},"--shiki-default:#22863A",[4052],{"type":41,"value":4053},"name",{"type":35,"tag":247,"props":4055,"children":4056},{"style":280},[4057],{"type":41,"value":2161},{"type":35,"tag":247,"props":4059,"children":4060},{"style":1478},[4061],{"type":41,"value":4062},"Scan image for vulnerabilities\n",{"type":35,"tag":247,"props":4064,"children":4065},{"class":249,"line":286},[4066,4071,4075],{"type":35,"tag":247,"props":4067,"children":4068},{"style":4050},[4069],{"type":41,"value":4070},"  uses",{"type":35,"tag":247,"props":4072,"children":4073},{"style":280},[4074],{"type":41,"value":2161},{"type":35,"tag":247,"props":4076,"children":4077},{"style":1478},[4078],{"type":41,"value":4079},"aquasecurity/trivy-action@master\n",{"type":35,"tag":247,"props":4081,"children":4082},{"class":249,"line":355},[4083,4088],{"type":35,"tag":247,"props":4084,"children":4085},{"style":4050},[4086],{"type":41,"value":4087},"  with",{"type":35,"tag":247,"props":4089,"children":4090},{"style":280},[4091],{"type":41,"value":4092},":\n",{"type":35,"tag":247,"props":4094,"children":4095},{"class":249,"line":412},[4096,4101,4105],{"type":35,"tag":247,"props":4097,"children":4098},{"style":4050},[4099],{"type":41,"value":4100},"    image-ref",{"type":35,"tag":247,"props":4102,"children":4103},{"style":280},[4104],{"type":41,"value":2161},{"type":35,"tag":247,"props":4106,"children":4107},{"style":1478},[4108],{"type":41,"value":4109},"${{ env.IMAGE }}\n",{"type":35,"tag":247,"props":4111,"children":4112},{"class":249,"line":454},[4113,4118,4122],{"type":35,"tag":247,"props":4114,"children":4115},{"style":4050},[4116],{"type":41,"value":4117},"    exit-code",{"type":35,"tag":247,"props":4119,"children":4120},{"style":280},[4121],{"type":41,"value":2161},{"type":35,"tag":247,"props":4123,"children":4124},{"style":1478},[4125],{"type":41,"value":4126},"'1'\n",{"type":35,"tag":247,"props":4128,"children":4129},{"class":249,"line":496},[4130,4135,4139],{"type":35,"tag":247,"props":4131,"children":4132},{"style":4050},[4133],{"type":41,"value":4134},"    severity",{"type":35,"tag":247,"props":4136,"children":4137},{"style":280},[4138],{"type":41,"value":2161},{"type":35,"tag":247,"props":4140,"children":4141},{"style":1478},[4142],{"type":41,"value":4143},"'CRITICAL,HIGH'\n",{"type":35,"tag":36,"props":4145,"children":4147},{"id":4146},"composing-services-locally-with-docker-compose",[4148],{"type":41,"value":4149},"Composing Services Locally with Docker Compose",{"type":35,"tag":44,"props":4151,"children":4152},{},[4153],{"type":41,"value":4154},"Docker Compose is the right tool for local development and integration testing. Here's a production-mirroring setup with secrets management:",{"type":35,"tag":237,"props":4156,"children":4158},{"className":4025,"code":4157,"language":4027,"meta":7,"style":7},"services:\n  api:\n    build: ./api\n    ports: [\"8080:8080\"]\n    environment:\n      DB_HOST: db\n      DB_PASSWORD_FILE: /run/secrets/db_password\n    depends_on:\n      db:\n        condition: service_healthy\n    secrets: [db_password]\n    healthcheck:\n      test: [\"CMD\", \"curl\", \"-f\", \"http://localhost:8080/health\"]\n      interval: 30s\n      timeout: 5s\n      retries: 3\n      start_period: 10s\n\n  db:\n    image: postgres:16-alpine\n    volumes: [db_data:/var/lib/postgresql/data]\n    environment:\n      POSTGRES_PASSWORD_FILE: /run/secrets/db_password\n    secrets: [db_password]\n    healthcheck:\n      test: [\"CMD\", \"pg_isready\", \"-U\", \"postgres\"]\n      interval: 10s\n\nvolumes:\n  db_data:\n\nsecrets:\n  db_password:\n    file: ./secrets/db_password.txt\n",[4159],{"type":35,"tag":194,"props":4160,"children":4161},{"__ignoreMap":7},[4162,4174,4186,4203,4226,4238,4255,4272,4284,4296,4313,4334,4346,4394,4411,4428,4445,4462,4469,4481,4498,4519,4530,4546,4565,4576,4622,4637,4644,4656,4668,4675,4687,4700],{"type":35,"tag":247,"props":4163,"children":4164},{"class":249,"line":250},[4165,4170],{"type":35,"tag":247,"props":4166,"children":4167},{"style":4050},[4168],{"type":41,"value":4169},"services",{"type":35,"tag":247,"props":4171,"children":4172},{"style":280},[4173],{"type":41,"value":4092},{"type":35,"tag":247,"props":4175,"children":4176},{"class":249,"line":276},[4177,4182],{"type":35,"tag":247,"props":4178,"children":4179},{"style":4050},[4180],{"type":41,"value":4181},"  api",{"type":35,"tag":247,"props":4183,"children":4184},{"style":280},[4185],{"type":41,"value":4092},{"type":35,"tag":247,"props":4187,"children":4188},{"class":249,"line":286},[4189,4194,4198],{"type":35,"tag":247,"props":4190,"children":4191},{"style":4050},[4192],{"type":41,"value":4193},"    build",{"type":35,"tag":247,"props":4195,"children":4196},{"style":280},[4197],{"type":41,"value":2161},{"type":35,"tag":247,"props":4199,"children":4200},{"style":1478},[4201],{"type":41,"value":4202},"./api\n",{"type":35,"tag":247,"props":4204,"children":4205},{"class":249,"line":355},[4206,4211,4216,4221],{"type":35,"tag":247,"props":4207,"children":4208},{"style":4050},[4209],{"type":41,"value":4210},"    ports",{"type":35,"tag":247,"props":4212,"children":4213},{"style":280},[4214],{"type":41,"value":4215},": [",{"type":35,"tag":247,"props":4217,"children":4218},{"style":1478},[4219],{"type":41,"value":4220},"\"8080:8080\"",{"type":35,"tag":247,"props":4222,"children":4223},{"style":280},[4224],{"type":41,"value":4225},"]\n",{"type":35,"tag":247,"props":4227,"children":4228},{"class":249,"line":412},[4229,4234],{"type":35,"tag":247,"props":4230,"children":4231},{"style":4050},[4232],{"type":41,"value":4233},"    environment",{"type":35,"tag":247,"props":4235,"children":4236},{"style":280},[4237],{"type":41,"value":4092},{"type":35,"tag":247,"props":4239,"children":4240},{"class":249,"line":454},[4241,4246,4250],{"type":35,"tag":247,"props":4242,"children":4243},{"style":4050},[4244],{"type":41,"value":4245},"      DB_HOST",{"type":35,"tag":247,"props":4247,"children":4248},{"style":280},[4249],{"type":41,"value":2161},{"type":35,"tag":247,"props":4251,"children":4252},{"style":1478},[4253],{"type":41,"value":4254},"db\n",{"type":35,"tag":247,"props":4256,"children":4257},{"class":249,"line":496},[4258,4263,4267],{"type":35,"tag":247,"props":4259,"children":4260},{"style":4050},[4261],{"type":41,"value":4262},"      DB_PASSWORD_FILE",{"type":35,"tag":247,"props":4264,"children":4265},{"style":280},[4266],{"type":41,"value":2161},{"type":35,"tag":247,"props":4268,"children":4269},{"style":1478},[4270],{"type":41,"value":4271},"/run/secrets/db_password\n",{"type":35,"tag":247,"props":4273,"children":4274},{"class":249,"line":553},[4275,4280],{"type":35,"tag":247,"props":4276,"children":4277},{"style":4050},[4278],{"type":41,"value":4279},"    depends_on",{"type":35,"tag":247,"props":4281,"children":4282},{"style":280},[4283],{"type":41,"value":4092},{"type":35,"tag":247,"props":4285,"children":4286},{"class":249,"line":595},[4287,4292],{"type":35,"tag":247,"props":4288,"children":4289},{"style":4050},[4290],{"type":41,"value":4291},"      db",{"type":35,"tag":247,"props":4293,"children":4294},{"style":280},[4295],{"type":41,"value":4092},{"type":35,"tag":247,"props":4297,"children":4298},{"class":249,"line":646},[4299,4304,4308],{"type":35,"tag":247,"props":4300,"children":4301},{"style":4050},[4302],{"type":41,"value":4303},"        condition",{"type":35,"tag":247,"props":4305,"children":4306},{"style":280},[4307],{"type":41,"value":2161},{"type":35,"tag":247,"props":4309,"children":4310},{"style":1478},[4311],{"type":41,"value":4312},"service_healthy\n",{"type":35,"tag":247,"props":4314,"children":4315},{"class":249,"line":918},[4316,4321,4325,4330],{"type":35,"tag":247,"props":4317,"children":4318},{"style":4050},[4319],{"type":41,"value":4320},"    secrets",{"type":35,"tag":247,"props":4322,"children":4323},{"style":280},[4324],{"type":41,"value":4215},{"type":35,"tag":247,"props":4326,"children":4327},{"style":1478},[4328],{"type":41,"value":4329},"db_password",{"type":35,"tag":247,"props":4331,"children":4332},{"style":280},[4333],{"type":41,"value":4225},{"type":35,"tag":247,"props":4335,"children":4336},{"class":249,"line":944},[4337,4342],{"type":35,"tag":247,"props":4338,"children":4339},{"style":4050},[4340],{"type":41,"value":4341},"    healthcheck",{"type":35,"tag":247,"props":4343,"children":4344},{"style":280},[4345],{"type":41,"value":4092},{"type":35,"tag":247,"props":4347,"children":4348},{"class":249,"line":985},[4349,4354,4358,4363,4367,4372,4376,4381,4385,4390],{"type":35,"tag":247,"props":4350,"children":4351},{"style":4050},[4352],{"type":41,"value":4353},"      test",{"type":35,"tag":247,"props":4355,"children":4356},{"style":280},[4357],{"type":41,"value":4215},{"type":35,"tag":247,"props":4359,"children":4360},{"style":1478},[4361],{"type":41,"value":4362},"\"CMD\"",{"type":35,"tag":247,"props":4364,"children":4365},{"style":280},[4366],{"type":41,"value":815},{"type":35,"tag":247,"props":4368,"children":4369},{"style":1478},[4370],{"type":41,"value":4371},"\"curl\"",{"type":35,"tag":247,"props":4373,"children":4374},{"style":280},[4375],{"type":41,"value":815},{"type":35,"tag":247,"props":4377,"children":4378},{"style":1478},[4379],{"type":41,"value":4380},"\"-f\"",{"type":35,"tag":247,"props":4382,"children":4383},{"style":280},[4384],{"type":41,"value":815},{"type":35,"tag":247,"props":4386,"children":4387},{"style":1478},[4388],{"type":41,"value":4389},"\"http://localhost:8080/health\"",{"type":35,"tag":247,"props":4391,"children":4392},{"style":280},[4393],{"type":41,"value":4225},{"type":35,"tag":247,"props":4395,"children":4396},{"class":249,"line":1013},[4397,4402,4406],{"type":35,"tag":247,"props":4398,"children":4399},{"style":4050},[4400],{"type":41,"value":4401},"      interval",{"type":35,"tag":247,"props":4403,"children":4404},{"style":280},[4405],{"type":41,"value":2161},{"type":35,"tag":247,"props":4407,"children":4408},{"style":1478},[4409],{"type":41,"value":4410},"30s\n",{"type":35,"tag":247,"props":4412,"children":4413},{"class":249,"line":1031},[4414,4419,4423],{"type":35,"tag":247,"props":4415,"children":4416},{"style":4050},[4417],{"type":41,"value":4418},"      timeout",{"type":35,"tag":247,"props":4420,"children":4421},{"style":280},[4422],{"type":41,"value":2161},{"type":35,"tag":247,"props":4424,"children":4425},{"style":1478},[4426],{"type":41,"value":4427},"5s\n",{"type":35,"tag":247,"props":4429,"children":4430},{"class":249,"line":1049},[4431,4436,4440],{"type":35,"tag":247,"props":4432,"children":4433},{"style":4050},[4434],{"type":41,"value":4435},"      retries",{"type":35,"tag":247,"props":4437,"children":4438},{"style":280},[4439],{"type":41,"value":2161},{"type":35,"tag":247,"props":4441,"children":4442},{"style":401},[4443],{"type":41,"value":4444},"3\n",{"type":35,"tag":247,"props":4446,"children":4447},{"class":249,"line":1058},[4448,4453,4457],{"type":35,"tag":247,"props":4449,"children":4450},{"style":4050},[4451],{"type":41,"value":4452},"      start_period",{"type":35,"tag":247,"props":4454,"children":4455},{"style":280},[4456],{"type":41,"value":2161},{"type":35,"tag":247,"props":4458,"children":4459},{"style":1478},[4460],{"type":41,"value":4461},"10s\n",{"type":35,"tag":247,"props":4463,"children":4464},{"class":249,"line":1067},[4465],{"type":35,"tag":247,"props":4466,"children":4467},{"emptyLinePlaceholder":762},[4468],{"type":41,"value":765},{"type":35,"tag":247,"props":4470,"children":4471},{"class":249,"line":1076},[4472,4477],{"type":35,"tag":247,"props":4473,"children":4474},{"style":4050},[4475],{"type":41,"value":4476},"  db",{"type":35,"tag":247,"props":4478,"children":4479},{"style":280},[4480],{"type":41,"value":4092},{"type":35,"tag":247,"props":4482,"children":4483},{"class":249,"line":1532},[4484,4489,4493],{"type":35,"tag":247,"props":4485,"children":4486},{"style":4050},[4487],{"type":41,"value":4488},"    image",{"type":35,"tag":247,"props":4490,"children":4491},{"style":280},[4492],{"type":41,"value":2161},{"type":35,"tag":247,"props":4494,"children":4495},{"style":1478},[4496],{"type":41,"value":4497},"postgres:16-alpine\n",{"type":35,"tag":247,"props":4499,"children":4500},{"class":249,"line":1541},[4501,4506,4510,4515],{"type":35,"tag":247,"props":4502,"children":4503},{"style":4050},[4504],{"type":41,"value":4505},"    volumes",{"type":35,"tag":247,"props":4507,"children":4508},{"style":280},[4509],{"type":41,"value":4215},{"type":35,"tag":247,"props":4511,"children":4512},{"style":1478},[4513],{"type":41,"value":4514},"db_data:/var/lib/postgresql/data",{"type":35,"tag":247,"props":4516,"children":4517},{"style":280},[4518],{"type":41,"value":4225},{"type":35,"tag":247,"props":4520,"children":4521},{"class":249,"line":1549},[4522,4526],{"type":35,"tag":247,"props":4523,"children":4524},{"style":4050},[4525],{"type":41,"value":4233},{"type":35,"tag":247,"props":4527,"children":4528},{"style":280},[4529],{"type":41,"value":4092},{"type":35,"tag":247,"props":4531,"children":4532},{"class":249,"line":1567},[4533,4538,4542],{"type":35,"tag":247,"props":4534,"children":4535},{"style":4050},[4536],{"type":41,"value":4537},"      POSTGRES_PASSWORD_FILE",{"type":35,"tag":247,"props":4539,"children":4540},{"style":280},[4541],{"type":41,"value":2161},{"type":35,"tag":247,"props":4543,"children":4544},{"style":1478},[4545],{"type":41,"value":4271},{"type":35,"tag":247,"props":4547,"children":4548},{"class":249,"line":1584},[4549,4553,4557,4561],{"type":35,"tag":247,"props":4550,"children":4551},{"style":4050},[4552],{"type":41,"value":4320},{"type":35,"tag":247,"props":4554,"children":4555},{"style":280},[4556],{"type":41,"value":4215},{"type":35,"tag":247,"props":4558,"children":4559},{"style":1478},[4560],{"type":41,"value":4329},{"type":35,"tag":247,"props":4562,"children":4563},{"style":280},[4564],{"type":41,"value":4225},{"type":35,"tag":247,"props":4566,"children":4567},{"class":249,"line":1593},[4568,4572],{"type":35,"tag":247,"props":4569,"children":4570},{"style":4050},[4571],{"type":41,"value":4341},{"type":35,"tag":247,"props":4573,"children":4574},{"style":280},[4575],{"type":41,"value":4092},{"type":35,"tag":247,"props":4577,"children":4578},{"class":249,"line":1601},[4579,4583,4587,4591,4595,4600,4604,4609,4613,4618],{"type":35,"tag":247,"props":4580,"children":4581},{"style":4050},[4582],{"type":41,"value":4353},{"type":35,"tag":247,"props":4584,"children":4585},{"style":280},[4586],{"type":41,"value":4215},{"type":35,"tag":247,"props":4588,"children":4589},{"style":1478},[4590],{"type":41,"value":4362},{"type":35,"tag":247,"props":4592,"children":4593},{"style":280},[4594],{"type":41,"value":815},{"type":35,"tag":247,"props":4596,"children":4597},{"style":1478},[4598],{"type":41,"value":4599},"\"pg_isready\"",{"type":35,"tag":247,"props":4601,"children":4602},{"style":280},[4603],{"type":41,"value":815},{"type":35,"tag":247,"props":4605,"children":4606},{"style":1478},[4607],{"type":41,"value":4608},"\"-U\"",{"type":35,"tag":247,"props":4610,"children":4611},{"style":280},[4612],{"type":41,"value":815},{"type":35,"tag":247,"props":4614,"children":4615},{"style":1478},[4616],{"type":41,"value":4617},"\"postgres\"",{"type":35,"tag":247,"props":4619,"children":4620},{"style":280},[4621],{"type":41,"value":4225},{"type":35,"tag":247,"props":4623,"children":4624},{"class":249,"line":1624},[4625,4629,4633],{"type":35,"tag":247,"props":4626,"children":4627},{"style":4050},[4628],{"type":41,"value":4401},{"type":35,"tag":247,"props":4630,"children":4631},{"style":280},[4632],{"type":41,"value":2161},{"type":35,"tag":247,"props":4634,"children":4635},{"style":1478},[4636],{"type":41,"value":4461},{"type":35,"tag":247,"props":4638,"children":4639},{"class":249,"line":1666},[4640],{"type":35,"tag":247,"props":4641,"children":4642},{"emptyLinePlaceholder":762},[4643],{"type":41,"value":765},{"type":35,"tag":247,"props":4645,"children":4646},{"class":249,"line":1675},[4647,4652],{"type":35,"tag":247,"props":4648,"children":4649},{"style":4050},[4650],{"type":41,"value":4651},"volumes",{"type":35,"tag":247,"props":4653,"children":4654},{"style":280},[4655],{"type":41,"value":4092},{"type":35,"tag":247,"props":4657,"children":4658},{"class":249,"line":1683},[4659,4664],{"type":35,"tag":247,"props":4660,"children":4661},{"style":4050},[4662],{"type":41,"value":4663},"  db_data",{"type":35,"tag":247,"props":4665,"children":4666},{"style":280},[4667],{"type":41,"value":4092},{"type":35,"tag":247,"props":4669,"children":4670},{"class":249,"line":2760},[4671],{"type":35,"tag":247,"props":4672,"children":4673},{"emptyLinePlaceholder":762},[4674],{"type":41,"value":765},{"type":35,"tag":247,"props":4676,"children":4677},{"class":249,"line":2795},[4678,4683],{"type":35,"tag":247,"props":4679,"children":4680},{"style":4050},[4681],{"type":41,"value":4682},"secrets",{"type":35,"tag":247,"props":4684,"children":4685},{"style":280},[4686],{"type":41,"value":4092},{"type":35,"tag":247,"props":4688,"children":4690},{"class":249,"line":4689},33,[4691,4696],{"type":35,"tag":247,"props":4692,"children":4693},{"style":4050},[4694],{"type":41,"value":4695},"  db_password",{"type":35,"tag":247,"props":4697,"children":4698},{"style":280},[4699],{"type":41,"value":4092},{"type":35,"tag":247,"props":4701,"children":4703},{"class":249,"line":4702},34,[4704,4709,4713],{"type":35,"tag":247,"props":4705,"children":4706},{"style":4050},[4707],{"type":41,"value":4708},"    file",{"type":35,"tag":247,"props":4710,"children":4711},{"style":280},[4712],{"type":41,"value":2161},{"type":35,"tag":247,"props":4714,"children":4715},{"style":1478},[4716],{"type":41,"value":4717},"./secrets/db_password.txt\n",{"type":35,"tag":44,"props":4719,"children":4720},{},[4721,4723,4729,4731,4737],{"type":41,"value":4722},"Two things worth highlighting here: ",{"type":35,"tag":194,"props":4724,"children":4726},{"className":4725},[],[4727],{"type":41,"value":4728},"depends_on",{"type":41,"value":4730}," with ",{"type":35,"tag":194,"props":4732,"children":4734},{"className":4733},[],[4735],{"type":41,"value":4736},"condition: service_healthy",{"type":41,"value":4738}," ensures the API only starts once the database is truly ready (not just the container process), and secrets are mounted as files rather than plain environment variables—reducing the risk of accidental exposure in logs.",{"type":35,"tag":36,"props":4740,"children":4742},{"id":4741},"kubernetes-orchestration-that-scales",[4743],{"type":41,"value":4744},"Kubernetes: Orchestration That Scales",{"type":35,"tag":44,"props":4746,"children":4747},{},[4748],{"type":41,"value":4749},"Kubernetes (K8s) takes over where Docker Compose leaves off. When you need automatic self-healing, zero-downtime deploys, and the ability to run hundreds of container replicas across a cluster, Kubernetes is the answer.",{"type":35,"tag":3769,"props":4751,"children":4753},{"id":4752},"core-kubernetes-primitives",[4754],{"type":41,"value":4755},"Core Kubernetes Primitives",{"type":35,"tag":66,"props":4757,"children":4758},{},[4759,4775],{"type":35,"tag":70,"props":4760,"children":4761},{},[4762],{"type":35,"tag":74,"props":4763,"children":4764},{},[4765,4770],{"type":35,"tag":78,"props":4766,"children":4767},{},[4768],{"type":41,"value":4769},"Object",{"type":35,"tag":78,"props":4771,"children":4772},{},[4773],{"type":41,"value":4774},"Purpose",{"type":35,"tag":94,"props":4776,"children":4777},{},[4778,4794,4810,4825,4841],{"type":35,"tag":74,"props":4779,"children":4780},{},[4781,4789],{"type":35,"tag":101,"props":4782,"children":4783},{},[4784],{"type":35,"tag":105,"props":4785,"children":4786},{},[4787],{"type":41,"value":4788},"Pod",{"type":35,"tag":101,"props":4790,"children":4791},{},[4792],{"type":41,"value":4793},"Smallest deployable unit; one or more containers sharing networking and storage",{"type":35,"tag":74,"props":4795,"children":4796},{},[4797,4805],{"type":35,"tag":101,"props":4798,"children":4799},{},[4800],{"type":35,"tag":105,"props":4801,"children":4802},{},[4803],{"type":41,"value":4804},"Deployment",{"type":35,"tag":101,"props":4806,"children":4807},{},[4808],{"type":41,"value":4809},"Declares desired state; manages rolling updates and rollbacks",{"type":35,"tag":74,"props":4811,"children":4812},{},[4813,4820],{"type":35,"tag":101,"props":4814,"children":4815},{},[4816],{"type":35,"tag":105,"props":4817,"children":4818},{},[4819],{"type":41,"value":82},{"type":35,"tag":101,"props":4821,"children":4822},{},[4823],{"type":41,"value":4824},"Stable network endpoint in front of a set of pods",{"type":35,"tag":74,"props":4826,"children":4827},{},[4828,4836],{"type":35,"tag":101,"props":4829,"children":4830},{},[4831],{"type":35,"tag":105,"props":4832,"children":4833},{},[4834],{"type":41,"value":4835},"ConfigMap / Secret",{"type":35,"tag":101,"props":4837,"children":4838},{},[4839],{"type":41,"value":4840},"Externalise configuration and credentials from images",{"type":35,"tag":74,"props":4842,"children":4843},{},[4844,4852],{"type":35,"tag":101,"props":4845,"children":4846},{},[4847],{"type":35,"tag":105,"props":4848,"children":4849},{},[4850],{"type":41,"value":4851},"HorizontalPodAutoscaler",{"type":35,"tag":101,"props":4853,"children":4854},{},[4855],{"type":41,"value":4856},"Automatically scales replica count based on CPU, memory, or custom metrics",{"type":35,"tag":3769,"props":4858,"children":4860},{"id":4859},"a-production-deployment-manifest",[4861],{"type":41,"value":4862},"A Production Deployment Manifest",{"type":35,"tag":237,"props":4864,"children":4866},{"className":4025,"code":4865,"language":4027,"meta":7,"style":7},"apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: order-service\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: order-service\n  strategy:\n    type: RollingUpdate\n    rollingUpdate:\n      maxUnavailable: 0       # Never take a pod down before a new one is ready\n      maxSurge: 1\n  template:\n    metadata:\n      labels:\n        app: order-service\n    spec:\n      containers:\n      - name: order-service\n        image: registry.example.com/order-service:v2.4.1\n        ports: [{containerPort: 8080}]\n        resources:\n          requests:\n            cpu: \"250m\"\n            memory: \"256Mi\"\n          limits:\n            cpu: \"500m\"\n            memory: \"512Mi\"\n        livenessProbe:\n          httpGet:\n            path: /health/live\n            port: 8080\n          initialDelaySeconds: 10\n          periodSeconds: 15\n        readinessProbe:\n          httpGet:\n            path: /health/ready\n            port: 8080\n          initialDelaySeconds: 5\n          periodSeconds: 10\n        securityContext:\n          runAsNonRoot: true\n          readOnlyRootFilesystem: true\n",[4867],{"type":35,"tag":194,"props":4868,"children":4869},{"__ignoreMap":7},[4870,4887,4904,4916,4933,4945,4961,4973,4985,5001,5013,5030,5042,5064,5081,5093,5105,5117,5133,5145,5157,5177,5194,5226,5238,5250,5267,5284,5296,5312,5328,5340,5352,5369,5386,5404,5422,5435,5447,5464,5480,5497,5513,5526,5544],{"type":35,"tag":247,"props":4871,"children":4872},{"class":249,"line":250},[4873,4878,4882],{"type":35,"tag":247,"props":4874,"children":4875},{"style":4050},[4876],{"type":41,"value":4877},"apiVersion",{"type":35,"tag":247,"props":4879,"children":4880},{"style":280},[4881],{"type":41,"value":2161},{"type":35,"tag":247,"props":4883,"children":4884},{"style":1478},[4885],{"type":41,"value":4886},"apps/v1\n",{"type":35,"tag":247,"props":4888,"children":4889},{"class":249,"line":276},[4890,4895,4899],{"type":35,"tag":247,"props":4891,"children":4892},{"style":4050},[4893],{"type":41,"value":4894},"kind",{"type":35,"tag":247,"props":4896,"children":4897},{"style":280},[4898],{"type":41,"value":2161},{"type":35,"tag":247,"props":4900,"children":4901},{"style":1478},[4902],{"type":41,"value":4903},"Deployment\n",{"type":35,"tag":247,"props":4905,"children":4906},{"class":249,"line":286},[4907,4912],{"type":35,"tag":247,"props":4908,"children":4909},{"style":4050},[4910],{"type":41,"value":4911},"metadata",{"type":35,"tag":247,"props":4913,"children":4914},{"style":280},[4915],{"type":41,"value":4092},{"type":35,"tag":247,"props":4917,"children":4918},{"class":249,"line":355},[4919,4924,4928],{"type":35,"tag":247,"props":4920,"children":4921},{"style":4050},[4922],{"type":41,"value":4923},"  name",{"type":35,"tag":247,"props":4925,"children":4926},{"style":280},[4927],{"type":41,"value":2161},{"type":35,"tag":247,"props":4929,"children":4930},{"style":1478},[4931],{"type":41,"value":4932},"order-service\n",{"type":35,"tag":247,"props":4934,"children":4935},{"class":249,"line":412},[4936,4941],{"type":35,"tag":247,"props":4937,"children":4938},{"style":4050},[4939],{"type":41,"value":4940},"spec",{"type":35,"tag":247,"props":4942,"children":4943},{"style":280},[4944],{"type":41,"value":4092},{"type":35,"tag":247,"props":4946,"children":4947},{"class":249,"line":454},[4948,4953,4957],{"type":35,"tag":247,"props":4949,"children":4950},{"style":4050},[4951],{"type":41,"value":4952},"  replicas",{"type":35,"tag":247,"props":4954,"children":4955},{"style":280},[4956],{"type":41,"value":2161},{"type":35,"tag":247,"props":4958,"children":4959},{"style":401},[4960],{"type":41,"value":4444},{"type":35,"tag":247,"props":4962,"children":4963},{"class":249,"line":496},[4964,4969],{"type":35,"tag":247,"props":4965,"children":4966},{"style":4050},[4967],{"type":41,"value":4968},"  selector",{"type":35,"tag":247,"props":4970,"children":4971},{"style":280},[4972],{"type":41,"value":4092},{"type":35,"tag":247,"props":4974,"children":4975},{"class":249,"line":553},[4976,4981],{"type":35,"tag":247,"props":4977,"children":4978},{"style":4050},[4979],{"type":41,"value":4980},"    matchLabels",{"type":35,"tag":247,"props":4982,"children":4983},{"style":280},[4984],{"type":41,"value":4092},{"type":35,"tag":247,"props":4986,"children":4987},{"class":249,"line":595},[4988,4993,4997],{"type":35,"tag":247,"props":4989,"children":4990},{"style":4050},[4991],{"type":41,"value":4992},"      app",{"type":35,"tag":247,"props":4994,"children":4995},{"style":280},[4996],{"type":41,"value":2161},{"type":35,"tag":247,"props":4998,"children":4999},{"style":1478},[5000],{"type":41,"value":4932},{"type":35,"tag":247,"props":5002,"children":5003},{"class":249,"line":646},[5004,5009],{"type":35,"tag":247,"props":5005,"children":5006},{"style":4050},[5007],{"type":41,"value":5008},"  strategy",{"type":35,"tag":247,"props":5010,"children":5011},{"style":280},[5012],{"type":41,"value":4092},{"type":35,"tag":247,"props":5014,"children":5015},{"class":249,"line":918},[5016,5021,5025],{"type":35,"tag":247,"props":5017,"children":5018},{"style":4050},[5019],{"type":41,"value":5020},"    type",{"type":35,"tag":247,"props":5022,"children":5023},{"style":280},[5024],{"type":41,"value":2161},{"type":35,"tag":247,"props":5026,"children":5027},{"style":1478},[5028],{"type":41,"value":5029},"RollingUpdate\n",{"type":35,"tag":247,"props":5031,"children":5032},{"class":249,"line":944},[5033,5038],{"type":35,"tag":247,"props":5034,"children":5035},{"style":4050},[5036],{"type":41,"value":5037},"    rollingUpdate",{"type":35,"tag":247,"props":5039,"children":5040},{"style":280},[5041],{"type":41,"value":4092},{"type":35,"tag":247,"props":5043,"children":5044},{"class":249,"line":985},[5045,5050,5054,5059],{"type":35,"tag":247,"props":5046,"children":5047},{"style":4050},[5048],{"type":41,"value":5049},"      maxUnavailable",{"type":35,"tag":247,"props":5051,"children":5052},{"style":280},[5053],{"type":41,"value":2161},{"type":35,"tag":247,"props":5055,"children":5056},{"style":401},[5057],{"type":41,"value":5058},"0",{"type":35,"tag":247,"props":5060,"children":5061},{"style":876},[5062],{"type":41,"value":5063},"       # Never take a pod down before a new one is ready\n",{"type":35,"tag":247,"props":5065,"children":5066},{"class":249,"line":1013},[5067,5072,5076],{"type":35,"tag":247,"props":5068,"children":5069},{"style":4050},[5070],{"type":41,"value":5071},"      maxSurge",{"type":35,"tag":247,"props":5073,"children":5074},{"style":280},[5075],{"type":41,"value":2161},{"type":35,"tag":247,"props":5077,"children":5078},{"style":401},[5079],{"type":41,"value":5080},"1\n",{"type":35,"tag":247,"props":5082,"children":5083},{"class":249,"line":1031},[5084,5089],{"type":35,"tag":247,"props":5085,"children":5086},{"style":4050},[5087],{"type":41,"value":5088},"  template",{"type":35,"tag":247,"props":5090,"children":5091},{"style":280},[5092],{"type":41,"value":4092},{"type":35,"tag":247,"props":5094,"children":5095},{"class":249,"line":1049},[5096,5101],{"type":35,"tag":247,"props":5097,"children":5098},{"style":4050},[5099],{"type":41,"value":5100},"    metadata",{"type":35,"tag":247,"props":5102,"children":5103},{"style":280},[5104],{"type":41,"value":4092},{"type":35,"tag":247,"props":5106,"children":5107},{"class":249,"line":1058},[5108,5113],{"type":35,"tag":247,"props":5109,"children":5110},{"style":4050},[5111],{"type":41,"value":5112},"      labels",{"type":35,"tag":247,"props":5114,"children":5115},{"style":280},[5116],{"type":41,"value":4092},{"type":35,"tag":247,"props":5118,"children":5119},{"class":249,"line":1067},[5120,5125,5129],{"type":35,"tag":247,"props":5121,"children":5122},{"style":4050},[5123],{"type":41,"value":5124},"        app",{"type":35,"tag":247,"props":5126,"children":5127},{"style":280},[5128],{"type":41,"value":2161},{"type":35,"tag":247,"props":5130,"children":5131},{"style":1478},[5132],{"type":41,"value":4932},{"type":35,"tag":247,"props":5134,"children":5135},{"class":249,"line":1076},[5136,5141],{"type":35,"tag":247,"props":5137,"children":5138},{"style":4050},[5139],{"type":41,"value":5140},"    spec",{"type":35,"tag":247,"props":5142,"children":5143},{"style":280},[5144],{"type":41,"value":4092},{"type":35,"tag":247,"props":5146,"children":5147},{"class":249,"line":1532},[5148,5153],{"type":35,"tag":247,"props":5149,"children":5150},{"style":4050},[5151],{"type":41,"value":5152},"      containers",{"type":35,"tag":247,"props":5154,"children":5155},{"style":280},[5156],{"type":41,"value":4092},{"type":35,"tag":247,"props":5158,"children":5159},{"class":249,"line":1541},[5160,5165,5169,5173],{"type":35,"tag":247,"props":5161,"children":5162},{"style":280},[5163],{"type":41,"value":5164},"      - ",{"type":35,"tag":247,"props":5166,"children":5167},{"style":4050},[5168],{"type":41,"value":4053},{"type":35,"tag":247,"props":5170,"children":5171},{"style":280},[5172],{"type":41,"value":2161},{"type":35,"tag":247,"props":5174,"children":5175},{"style":1478},[5176],{"type":41,"value":4932},{"type":35,"tag":247,"props":5178,"children":5179},{"class":249,"line":1549},[5180,5185,5189],{"type":35,"tag":247,"props":5181,"children":5182},{"style":4050},[5183],{"type":41,"value":5184},"        image",{"type":35,"tag":247,"props":5186,"children":5187},{"style":280},[5188],{"type":41,"value":2161},{"type":35,"tag":247,"props":5190,"children":5191},{"style":1478},[5192],{"type":41,"value":5193},"registry.example.com/order-service:v2.4.1\n",{"type":35,"tag":247,"props":5195,"children":5196},{"class":249,"line":1567},[5197,5202,5207,5212,5216,5221],{"type":35,"tag":247,"props":5198,"children":5199},{"style":4050},[5200],{"type":41,"value":5201},"        ports",{"type":35,"tag":247,"props":5203,"children":5204},{"style":280},[5205],{"type":41,"value":5206},": [{",{"type":35,"tag":247,"props":5208,"children":5209},{"style":4050},[5210],{"type":41,"value":5211},"containerPort",{"type":35,"tag":247,"props":5213,"children":5214},{"style":280},[5215],{"type":41,"value":2161},{"type":35,"tag":247,"props":5217,"children":5218},{"style":401},[5219],{"type":41,"value":5220},"8080",{"type":35,"tag":247,"props":5222,"children":5223},{"style":280},[5224],{"type":41,"value":5225},"}]\n",{"type":35,"tag":247,"props":5227,"children":5228},{"class":249,"line":1584},[5229,5234],{"type":35,"tag":247,"props":5230,"children":5231},{"style":4050},[5232],{"type":41,"value":5233},"        resources",{"type":35,"tag":247,"props":5235,"children":5236},{"style":280},[5237],{"type":41,"value":4092},{"type":35,"tag":247,"props":5239,"children":5240},{"class":249,"line":1593},[5241,5246],{"type":35,"tag":247,"props":5242,"children":5243},{"style":4050},[5244],{"type":41,"value":5245},"          requests",{"type":35,"tag":247,"props":5247,"children":5248},{"style":280},[5249],{"type":41,"value":4092},{"type":35,"tag":247,"props":5251,"children":5252},{"class":249,"line":1601},[5253,5258,5262],{"type":35,"tag":247,"props":5254,"children":5255},{"style":4050},[5256],{"type":41,"value":5257},"            cpu",{"type":35,"tag":247,"props":5259,"children":5260},{"style":280},[5261],{"type":41,"value":2161},{"type":35,"tag":247,"props":5263,"children":5264},{"style":1478},[5265],{"type":41,"value":5266},"\"250m\"\n",{"type":35,"tag":247,"props":5268,"children":5269},{"class":249,"line":1624},[5270,5275,5279],{"type":35,"tag":247,"props":5271,"children":5272},{"style":4050},[5273],{"type":41,"value":5274},"            memory",{"type":35,"tag":247,"props":5276,"children":5277},{"style":280},[5278],{"type":41,"value":2161},{"type":35,"tag":247,"props":5280,"children":5281},{"style":1478},[5282],{"type":41,"value":5283},"\"256Mi\"\n",{"type":35,"tag":247,"props":5285,"children":5286},{"class":249,"line":1666},[5287,5292],{"type":35,"tag":247,"props":5288,"children":5289},{"style":4050},[5290],{"type":41,"value":5291},"          limits",{"type":35,"tag":247,"props":5293,"children":5294},{"style":280},[5295],{"type":41,"value":4092},{"type":35,"tag":247,"props":5297,"children":5298},{"class":249,"line":1675},[5299,5303,5307],{"type":35,"tag":247,"props":5300,"children":5301},{"style":4050},[5302],{"type":41,"value":5257},{"type":35,"tag":247,"props":5304,"children":5305},{"style":280},[5306],{"type":41,"value":2161},{"type":35,"tag":247,"props":5308,"children":5309},{"style":1478},[5310],{"type":41,"value":5311},"\"500m\"\n",{"type":35,"tag":247,"props":5313,"children":5314},{"class":249,"line":1683},[5315,5319,5323],{"type":35,"tag":247,"props":5316,"children":5317},{"style":4050},[5318],{"type":41,"value":5274},{"type":35,"tag":247,"props":5320,"children":5321},{"style":280},[5322],{"type":41,"value":2161},{"type":35,"tag":247,"props":5324,"children":5325},{"style":1478},[5326],{"type":41,"value":5327},"\"512Mi\"\n",{"type":35,"tag":247,"props":5329,"children":5330},{"class":249,"line":2760},[5331,5336],{"type":35,"tag":247,"props":5332,"children":5333},{"style":4050},[5334],{"type":41,"value":5335},"        livenessProbe",{"type":35,"tag":247,"props":5337,"children":5338},{"style":280},[5339],{"type":41,"value":4092},{"type":35,"tag":247,"props":5341,"children":5342},{"class":249,"line":2795},[5343,5348],{"type":35,"tag":247,"props":5344,"children":5345},{"style":4050},[5346],{"type":41,"value":5347},"          httpGet",{"type":35,"tag":247,"props":5349,"children":5350},{"style":280},[5351],{"type":41,"value":4092},{"type":35,"tag":247,"props":5353,"children":5354},{"class":249,"line":4689},[5355,5360,5364],{"type":35,"tag":247,"props":5356,"children":5357},{"style":4050},[5358],{"type":41,"value":5359},"            path",{"type":35,"tag":247,"props":5361,"children":5362},{"style":280},[5363],{"type":41,"value":2161},{"type":35,"tag":247,"props":5365,"children":5366},{"style":1478},[5367],{"type":41,"value":5368},"/health/live\n",{"type":35,"tag":247,"props":5370,"children":5371},{"class":249,"line":4702},[5372,5377,5381],{"type":35,"tag":247,"props":5373,"children":5374},{"style":4050},[5375],{"type":41,"value":5376},"            port",{"type":35,"tag":247,"props":5378,"children":5379},{"style":280},[5380],{"type":41,"value":2161},{"type":35,"tag":247,"props":5382,"children":5383},{"style":401},[5384],{"type":41,"value":5385},"8080\n",{"type":35,"tag":247,"props":5387,"children":5389},{"class":249,"line":5388},35,[5390,5395,5399],{"type":35,"tag":247,"props":5391,"children":5392},{"style":4050},[5393],{"type":41,"value":5394},"          initialDelaySeconds",{"type":35,"tag":247,"props":5396,"children":5397},{"style":280},[5398],{"type":41,"value":2161},{"type":35,"tag":247,"props":5400,"children":5401},{"style":401},[5402],{"type":41,"value":5403},"10\n",{"type":35,"tag":247,"props":5405,"children":5407},{"class":249,"line":5406},36,[5408,5413,5417],{"type":35,"tag":247,"props":5409,"children":5410},{"style":4050},[5411],{"type":41,"value":5412},"          periodSeconds",{"type":35,"tag":247,"props":5414,"children":5415},{"style":280},[5416],{"type":41,"value":2161},{"type":35,"tag":247,"props":5418,"children":5419},{"style":401},[5420],{"type":41,"value":5421},"15\n",{"type":35,"tag":247,"props":5423,"children":5425},{"class":249,"line":5424},37,[5426,5431],{"type":35,"tag":247,"props":5427,"children":5428},{"style":4050},[5429],{"type":41,"value":5430},"        readinessProbe",{"type":35,"tag":247,"props":5432,"children":5433},{"style":280},[5434],{"type":41,"value":4092},{"type":35,"tag":247,"props":5436,"children":5438},{"class":249,"line":5437},38,[5439,5443],{"type":35,"tag":247,"props":5440,"children":5441},{"style":4050},[5442],{"type":41,"value":5347},{"type":35,"tag":247,"props":5444,"children":5445},{"style":280},[5446],{"type":41,"value":4092},{"type":35,"tag":247,"props":5448,"children":5450},{"class":249,"line":5449},39,[5451,5455,5459],{"type":35,"tag":247,"props":5452,"children":5453},{"style":4050},[5454],{"type":41,"value":5359},{"type":35,"tag":247,"props":5456,"children":5457},{"style":280},[5458],{"type":41,"value":2161},{"type":35,"tag":247,"props":5460,"children":5461},{"style":1478},[5462],{"type":41,"value":5463},"/health/ready\n",{"type":35,"tag":247,"props":5465,"children":5467},{"class":249,"line":5466},40,[5468,5472,5476],{"type":35,"tag":247,"props":5469,"children":5470},{"style":4050},[5471],{"type":41,"value":5376},{"type":35,"tag":247,"props":5473,"children":5474},{"style":280},[5475],{"type":41,"value":2161},{"type":35,"tag":247,"props":5477,"children":5478},{"style":401},[5479],{"type":41,"value":5385},{"type":35,"tag":247,"props":5481,"children":5483},{"class":249,"line":5482},41,[5484,5488,5492],{"type":35,"tag":247,"props":5485,"children":5486},{"style":4050},[5487],{"type":41,"value":5394},{"type":35,"tag":247,"props":5489,"children":5490},{"style":280},[5491],{"type":41,"value":2161},{"type":35,"tag":247,"props":5493,"children":5494},{"style":401},[5495],{"type":41,"value":5496},"5\n",{"type":35,"tag":247,"props":5498,"children":5500},{"class":249,"line":5499},42,[5501,5505,5509],{"type":35,"tag":247,"props":5502,"children":5503},{"style":4050},[5504],{"type":41,"value":5412},{"type":35,"tag":247,"props":5506,"children":5507},{"style":280},[5508],{"type":41,"value":2161},{"type":35,"tag":247,"props":5510,"children":5511},{"style":401},[5512],{"type":41,"value":5403},{"type":35,"tag":247,"props":5514,"children":5516},{"class":249,"line":5515},43,[5517,5522],{"type":35,"tag":247,"props":5518,"children":5519},{"style":4050},[5520],{"type":41,"value":5521},"        securityContext",{"type":35,"tag":247,"props":5523,"children":5524},{"style":280},[5525],{"type":41,"value":4092},{"type":35,"tag":247,"props":5527,"children":5529},{"class":249,"line":5528},44,[5530,5535,5539],{"type":35,"tag":247,"props":5531,"children":5532},{"style":4050},[5533],{"type":41,"value":5534},"          runAsNonRoot",{"type":35,"tag":247,"props":5536,"children":5537},{"style":280},[5538],{"type":41,"value":2161},{"type":35,"tag":247,"props":5540,"children":5541},{"style":401},[5542],{"type":41,"value":5543},"true\n",{"type":35,"tag":247,"props":5545,"children":5547},{"class":249,"line":5546},45,[5548,5553,5557],{"type":35,"tag":247,"props":5549,"children":5550},{"style":4050},[5551],{"type":41,"value":5552},"          readOnlyRootFilesystem",{"type":35,"tag":247,"props":5554,"children":5555},{"style":280},[5556],{"type":41,"value":2161},{"type":35,"tag":247,"props":5558,"children":5559},{"style":401},[5560],{"type":41,"value":5543},{"type":35,"tag":44,"props":5562,"children":5563},{},[5564,5566,5572,5574,5580],{"type":41,"value":5565},"Setting ",{"type":35,"tag":194,"props":5567,"children":5569},{"className":5568},[],[5570],{"type":41,"value":5571},"maxUnavailable: 0",{"type":41,"value":5573}," and ",{"type":35,"tag":194,"props":5575,"children":5577},{"className":5576},[],[5578],{"type":41,"value":5579},"maxSurge: 1",{"type":41,"value":5581}," means Kubernetes always keeps the full replica count healthy during a rollout — zero-downtime deploys become the default.",{"type":35,"tag":36,"props":5583,"children":5585},{"id":5584},"case-study-containerising-a-legacy-net-platform",[5586],{"type":41,"value":5587},"Case Study: Containerising a Legacy .NET Platform",{"type":35,"tag":44,"props":5589,"children":5590},{},[5591],{"type":41,"value":5592},"A financial services client came to us with a Windows-server monolith that took three hours to deploy and consistently caused configuration drift between environments. Our containerisation project over eight weeks delivered:",{"type":35,"tag":66,"props":5594,"children":5595},{},[5596,5617],{"type":35,"tag":70,"props":5597,"children":5598},{},[5599],{"type":35,"tag":74,"props":5600,"children":5601},{},[5602,5607,5612],{"type":35,"tag":78,"props":5603,"children":5604},{},[5605],{"type":41,"value":5606},"Metric",{"type":35,"tag":78,"props":5608,"children":5609},{},[5610],{"type":41,"value":5611},"Before",{"type":35,"tag":78,"props":5613,"children":5614},{},[5615],{"type":41,"value":5616},"After",{"type":35,"tag":94,"props":5618,"children":5619},{},[5620,5638,5656,5674],{"type":35,"tag":74,"props":5621,"children":5622},{},[5623,5628,5633],{"type":35,"tag":101,"props":5624,"children":5625},{},[5626],{"type":41,"value":5627},"Deployment time",{"type":35,"tag":101,"props":5629,"children":5630},{},[5631],{"type":41,"value":5632},"~3 hours",{"type":35,"tag":101,"props":5634,"children":5635},{},[5636],{"type":41,"value":5637},"~8 minutes",{"type":35,"tag":74,"props":5639,"children":5640},{},[5641,5646,5651],{"type":35,"tag":101,"props":5642,"children":5643},{},[5644],{"type":41,"value":5645},"Environment parity",{"type":35,"tag":101,"props":5647,"children":5648},{},[5649],{"type":41,"value":5650},"❌ frequent drift",{"type":35,"tag":101,"props":5652,"children":5653},{},[5654],{"type":41,"value":5655},"✅ identical images",{"type":35,"tag":74,"props":5657,"children":5658},{},[5659,5664,5669],{"type":35,"tag":101,"props":5660,"children":5661},{},[5662],{"type":41,"value":5663},"Infrastructure cost",{"type":35,"tag":101,"props":5665,"children":5666},{},[5667],{"type":41,"value":5668},"baseline",{"type":35,"tag":101,"props":5670,"children":5671},{},[5672],{"type":41,"value":5673},"−40%",{"type":35,"tag":74,"props":5675,"children":5676},{},[5677,5682,5687],{"type":35,"tag":101,"props":5678,"children":5679},{},[5680],{"type":41,"value":5681},"Release cadence",{"type":35,"tag":101,"props":5683,"children":5684},{},[5685],{"type":41,"value":5686},"monthly",{"type":35,"tag":101,"props":5688,"children":5689},{},[5690],{"type":41,"value":5691},"weekly",{"type":35,"tag":44,"props":5693,"children":5694},{},[5695],{"type":41,"value":5696},"The key steps: extracting configuration into environment variables, adding structured health-check endpoints the probes could target, building images in CI using multi-stage Dockerfiles, and deploying to AKS with Helm charts versioned alongside the application code.",{"type":35,"tag":36,"props":5698,"children":5700},{"id":5699},"what-to-containerise-first",[5701],{"type":41,"value":5702},"What to Containerise First",{"type":35,"tag":44,"props":5704,"children":5705},{},[5706],{"type":41,"value":5707},"Not everything benefits equally from containerisation. Start here:",{"type":35,"tag":179,"props":5709,"children":5710},{},[5711,5721,5731],{"type":35,"tag":183,"props":5712,"children":5713},{},[5714,5719],{"type":35,"tag":105,"props":5715,"children":5716},{},[5717],{"type":41,"value":5718},"Stateless HTTP services",{"type":41,"value":5720}," — the easiest wins with the highest immediate benefit",{"type":35,"tag":183,"props":5722,"children":5723},{},[5724,5729],{"type":35,"tag":105,"props":5725,"children":5726},{},[5727],{"type":41,"value":5728},"Background workers and scheduled jobs",{"type":41,"value":5730}," — clean separation of concerns from your main API",{"type":35,"tag":183,"props":5732,"children":5733},{},[5734,5739],{"type":35,"tag":105,"props":5735,"children":5736},{},[5737],{"type":41,"value":5738},"Third-party dependencies in dev",{"type":41,"value":5740}," (databases, queues, email servers) — Compose makes local parity trivial",{"type":35,"tag":44,"props":5742,"children":5743},{},[5744],{"type":41,"value":5745},"Tackle stateful services (primary databases, file stores) last, and only when you have a solid understanding of volume management and backup strategies in your target cluster.",{"type":35,"tag":44,"props":5747,"children":5748},{},[5749],{"type":41,"value":5750},"Containerisation isn't a destination—it's the foundation for everything from zero-downtime deployments to auto-scaling to disaster recovery. Build the discipline into your workflow from day one.",{"type":35,"tag":2978,"props":5752,"children":5753},{},[5754],{"type":41,"value":2982},{"title":7,"searchDepth":286,"depth":286,"links":5756},[5757,5758,5759,5763,5764,5768,5769],{"id":3668,"depth":276,"text":3671},{"id":3700,"depth":276,"text":3703},{"id":3759,"depth":276,"text":3762,"children":5760},[5761,5762],{"id":3771,"depth":286,"text":3774},{"id":3932,"depth":286,"text":3935},{"id":4146,"depth":276,"text":4149},{"id":4741,"depth":276,"text":4744,"children":5765},[5766,5767],{"id":4752,"depth":286,"text":4755},{"id":4859,"depth":286,"text":4862},{"id":5584,"depth":276,"text":5587},{"id":5699,"depth":276,"text":5702},"content:blog:containerization-guide.md","blog/containerization-guide.md","blog/containerization-guide",{"_path":5774,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":5775,"description":5776,"slug":5777,"date":11,"readTime":5778,"category":13,"image":5779,"imageCaption":5780,"author":5781,"tags":5783,"body":5789,"_type":2993,"_id":8519,"_source":2995,"_file":8520,"_stem":8521,"_extension":2998},"/blog/database-optimization","Database Performance Optimisation: How We Cut Query Time from 1200ms to 85ms","A deep-dive into the indexing strategies, query rewrites, and caching techniques that tripled throughput for a 50,000+ orders/day e-commerce platform—and the systematic process you can replicate.","database-optimization","13 min","https://images.unsplash.com/photo-1544383835-bda2bc66a55d?w=1200&h=600&fit=crop&auto=format","Server infrastructure powering high-throughput database operations",{"name":17,"role":18,"avatar":19,"bio":20,"social":5782},{"github":22,"twitter":23,"linkedin":24},[5784,5785,5786,5787,5788],"Databases","PostgreSQL","Performance","Optimisation","Scalability",{"type":32,"children":5790,"toc":8498},[5791,5797,5802,5807,5813,5818,5872,6078,6083,6089,6095,6100,6412,6417,6471,6477,6482,6612,6618,6623,6910,6916,6921,6927,6932,6976,6981,7007,7013,7018,7196,7215,7221,7226,7309,7314,7320,7325,7452,7457,7463,7468,7474,7990,7995,8001,8006,8269,8280,8286,8291,8386,8391,8397,8402,8489,8494],{"type":35,"tag":36,"props":5792,"children":5794},{"id":5793},"the-problem-no-one-sees-until-its-too-late",[5795],{"type":41,"value":5796},"The Problem No One Sees Until It's Too Late",{"type":35,"tag":44,"props":5798,"children":5799},{},[5800],{"type":41,"value":5801},"Database performance rarely degrades all at once. It creeps up gradually: a query that took 80ms at launch takes 300ms after six months of data growth, then 900ms a year later. By the time users notice slowness, the problem is already severe.",{"type":35,"tag":44,"props":5803,"children":5804},{},[5805],{"type":41,"value":5806},"We see this pattern repeatedly at MediaFront. The good news: most database performance issues stem from the same handful of root causes, and fixing them systematically delivers dramatic improvements without hardware upgrades.",{"type":35,"tag":36,"props":5808,"children":5810},{"id":5809},"start-with-measurement-not-guesses",[5811],{"type":41,"value":5812},"Start With Measurement, Not Guesses",{"type":35,"tag":44,"props":5814,"children":5815},{},[5816],{"type":41,"value":5817},"Every optimisation project begins the same way: instrument before you optimise. Guessing which query is slow wastes weeks. Your tools:",{"type":35,"tag":2939,"props":5819,"children":5820},{},[5821,5837,5862],{"type":35,"tag":183,"props":5822,"children":5823},{},[5824,5828,5829,5835],{"type":35,"tag":105,"props":5825,"children":5826},{},[5827],{"type":41,"value":5785},{"type":41,"value":192},{"type":35,"tag":194,"props":5830,"children":5832},{"className":5831},[],[5833],{"type":41,"value":5834},"pg_stat_statements",{"type":41,"value":5836}," extension tracks cumulative query execution time across all calls",{"type":35,"tag":183,"props":5838,"children":5839},{},[5840,5845,5847,5853,5854,5860],{"type":35,"tag":105,"props":5841,"children":5842},{},[5843],{"type":41,"value":5844},"MySQL",{"type":41,"value":5846}," — the ",{"type":35,"tag":194,"props":5848,"children":5850},{"className":5849},[],[5851],{"type":41,"value":5852},"slow_query_log",{"type":41,"value":4730},{"type":35,"tag":194,"props":5855,"children":5857},{"className":5856},[],[5858],{"type":41,"value":5859},"long_query_time = 0.1",{"type":41,"value":5861}," captures everything above 100ms",{"type":35,"tag":183,"props":5863,"children":5864},{},[5865,5870],{"type":35,"tag":105,"props":5866,"children":5867},{},[5868],{"type":41,"value":5869},"SQL Server",{"type":41,"value":5871}," — Query Store provides a GUI over the same data",{"type":35,"tag":237,"props":5873,"children":5877},{"className":5874,"code":5875,"language":5876,"meta":7,"style":7},"language-sql shiki shiki-themes github-light","-- Find your 10 most expensive queries in PostgreSQL\nSELECT\n  query,\n  calls,\n  round(total_exec_time::numeric, 2) AS total_ms,\n  round(mean_exec_time::numeric, 2)  AS avg_ms,\n  round(stddev_exec_time::numeric, 2) AS stddev_ms\nFROM pg_stat_statements\nORDER BY total_exec_time DESC\nLIMIT 10;\n","sql",[5878],{"type":35,"tag":194,"props":5879,"children":5880},{"__ignoreMap":7},[5881,5889,5897,5905,5913,5955,5993,6030,6043,6061],{"type":35,"tag":247,"props":5882,"children":5883},{"class":249,"line":250},[5884],{"type":35,"tag":247,"props":5885,"children":5886},{"style":876},[5887],{"type":41,"value":5888},"-- Find your 10 most expensive queries in PostgreSQL\n",{"type":35,"tag":247,"props":5890,"children":5891},{"class":249,"line":276},[5892],{"type":35,"tag":247,"props":5893,"children":5894},{"style":254},[5895],{"type":41,"value":5896},"SELECT\n",{"type":35,"tag":247,"props":5898,"children":5899},{"class":249,"line":286},[5900],{"type":35,"tag":247,"props":5901,"children":5902},{"style":280},[5903],{"type":41,"value":5904},"  query,\n",{"type":35,"tag":247,"props":5906,"children":5907},{"class":249,"line":355},[5908],{"type":35,"tag":247,"props":5909,"children":5910},{"style":280},[5911],{"type":41,"value":5912},"  calls,\n",{"type":35,"tag":247,"props":5914,"children":5915},{"class":249,"line":412},[5916,5921,5926,5931,5935,5940,5945,5950],{"type":35,"tag":247,"props":5917,"children":5918},{"style":401},[5919],{"type":41,"value":5920},"  round",{"type":35,"tag":247,"props":5922,"children":5923},{"style":280},[5924],{"type":41,"value":5925},"(total_exec_time::",{"type":35,"tag":247,"props":5927,"children":5928},{"style":254},[5929],{"type":41,"value":5930},"numeric",{"type":35,"tag":247,"props":5932,"children":5933},{"style":280},[5934],{"type":41,"value":815},{"type":35,"tag":247,"props":5936,"children":5937},{"style":401},[5938],{"type":41,"value":5939},"2",{"type":35,"tag":247,"props":5941,"children":5942},{"style":280},[5943],{"type":41,"value":5944},") ",{"type":35,"tag":247,"props":5946,"children":5947},{"style":254},[5948],{"type":41,"value":5949},"AS",{"type":35,"tag":247,"props":5951,"children":5952},{"style":280},[5953],{"type":41,"value":5954}," total_ms,\n",{"type":35,"tag":247,"props":5956,"children":5957},{"class":249,"line":454},[5958,5962,5967,5971,5975,5979,5984,5988],{"type":35,"tag":247,"props":5959,"children":5960},{"style":401},[5961],{"type":41,"value":5920},{"type":35,"tag":247,"props":5963,"children":5964},{"style":280},[5965],{"type":41,"value":5966},"(mean_exec_time::",{"type":35,"tag":247,"props":5968,"children":5969},{"style":254},[5970],{"type":41,"value":5930},{"type":35,"tag":247,"props":5972,"children":5973},{"style":280},[5974],{"type":41,"value":815},{"type":35,"tag":247,"props":5976,"children":5977},{"style":401},[5978],{"type":41,"value":5939},{"type":35,"tag":247,"props":5980,"children":5981},{"style":280},[5982],{"type":41,"value":5983},")  ",{"type":35,"tag":247,"props":5985,"children":5986},{"style":254},[5987],{"type":41,"value":5949},{"type":35,"tag":247,"props":5989,"children":5990},{"style":280},[5991],{"type":41,"value":5992}," avg_ms,\n",{"type":35,"tag":247,"props":5994,"children":5995},{"class":249,"line":496},[5996,6000,6005,6009,6013,6017,6021,6025],{"type":35,"tag":247,"props":5997,"children":5998},{"style":401},[5999],{"type":41,"value":5920},{"type":35,"tag":247,"props":6001,"children":6002},{"style":280},[6003],{"type":41,"value":6004},"(stddev_exec_time::",{"type":35,"tag":247,"props":6006,"children":6007},{"style":254},[6008],{"type":41,"value":5930},{"type":35,"tag":247,"props":6010,"children":6011},{"style":280},[6012],{"type":41,"value":815},{"type":35,"tag":247,"props":6014,"children":6015},{"style":401},[6016],{"type":41,"value":5939},{"type":35,"tag":247,"props":6018,"children":6019},{"style":280},[6020],{"type":41,"value":5944},{"type":35,"tag":247,"props":6022,"children":6023},{"style":254},[6024],{"type":41,"value":5949},{"type":35,"tag":247,"props":6026,"children":6027},{"style":280},[6028],{"type":41,"value":6029}," stddev_ms\n",{"type":35,"tag":247,"props":6031,"children":6032},{"class":249,"line":553},[6033,6038],{"type":35,"tag":247,"props":6034,"children":6035},{"style":254},[6036],{"type":41,"value":6037},"FROM",{"type":35,"tag":247,"props":6039,"children":6040},{"style":280},[6041],{"type":41,"value":6042}," pg_stat_statements\n",{"type":35,"tag":247,"props":6044,"children":6045},{"class":249,"line":595},[6046,6051,6056],{"type":35,"tag":247,"props":6047,"children":6048},{"style":254},[6049],{"type":41,"value":6050},"ORDER BY",{"type":35,"tag":247,"props":6052,"children":6053},{"style":280},[6054],{"type":41,"value":6055}," total_exec_time ",{"type":35,"tag":247,"props":6057,"children":6058},{"style":254},[6059],{"type":41,"value":6060},"DESC\n",{"type":35,"tag":247,"props":6062,"children":6063},{"class":249,"line":646},[6064,6069,6074],{"type":35,"tag":247,"props":6065,"children":6066},{"style":254},[6067],{"type":41,"value":6068},"LIMIT",{"type":35,"tag":247,"props":6070,"children":6071},{"style":401},[6072],{"type":41,"value":6073}," 10",{"type":35,"tag":247,"props":6075,"children":6076},{"style":280},[6077],{"type":41,"value":409},{"type":35,"tag":44,"props":6079,"children":6080},{},[6081],{"type":41,"value":6082},"Fix the queries at the top of this list first. A 10× improvement on a query called 10,000 times per day is worth far more than a 100× improvement on one called 20 times.",{"type":35,"tag":36,"props":6084,"children":6086},{"id":6085},"query-optimisation-the-high-roi-fixes",[6087],{"type":41,"value":6088},"Query Optimisation: The High-ROI Fixes",{"type":35,"tag":3769,"props":6090,"children":6092},{"id":6091},"always-run-explain-analyze",[6093],{"type":41,"value":6094},"Always Run EXPLAIN ANALYZE",{"type":35,"tag":44,"props":6096,"children":6097},{},[6098],{"type":41,"value":6099},"Before touching an index or schema, understand how the database executes the query:",{"type":35,"tag":237,"props":6101,"children":6103},{"className":5874,"code":6102,"language":5876,"meta":7,"style":7},"EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT)\nSELECT\n    c.customer_id,\n    c.name,\n    COUNT(o.order_id)     AS order_count,\n    SUM(o.total_amount)   AS total_spent\nFROM customers c\nLEFT JOIN orders o ON c.customer_id = o.customer_id\nWHERE c.signup_date > '2024-01-01'\nGROUP BY c.customer_id, c.name\nORDER BY total_spent DESC\nLIMIT 100;\n",[6104],{"type":35,"tag":194,"props":6105,"children":6106},{"__ignoreMap":7},[6107,6124,6131,6152,6171,6211,6250,6262,6311,6342,6380,6396],{"type":35,"tag":247,"props":6108,"children":6109},{"class":249,"line":250},[6110,6115,6120],{"type":35,"tag":247,"props":6111,"children":6112},{"style":280},[6113],{"type":41,"value":6114},"EXPLAIN (ANALYZE, BUFFERS, FORMAT ",{"type":35,"tag":247,"props":6116,"children":6117},{"style":254},[6118],{"type":41,"value":6119},"TEXT",{"type":35,"tag":247,"props":6121,"children":6122},{"style":280},[6123],{"type":41,"value":840},{"type":35,"tag":247,"props":6125,"children":6126},{"class":249,"line":276},[6127],{"type":35,"tag":247,"props":6128,"children":6129},{"style":254},[6130],{"type":41,"value":5896},{"type":35,"tag":247,"props":6132,"children":6133},{"class":249,"line":286},[6134,6139,6143,6148],{"type":35,"tag":247,"props":6135,"children":6136},{"style":401},[6137],{"type":41,"value":6138},"    c",{"type":35,"tag":247,"props":6140,"children":6141},{"style":280},[6142],{"type":41,"value":3692},{"type":35,"tag":247,"props":6144,"children":6145},{"style":401},[6146],{"type":41,"value":6147},"customer_id",{"type":35,"tag":247,"props":6149,"children":6150},{"style":280},[6151],{"type":41,"value":982},{"type":35,"tag":247,"props":6153,"children":6154},{"class":249,"line":355},[6155,6159,6163,6167],{"type":35,"tag":247,"props":6156,"children":6157},{"style":401},[6158],{"type":41,"value":6138},{"type":35,"tag":247,"props":6160,"children":6161},{"style":280},[6162],{"type":41,"value":3692},{"type":35,"tag":247,"props":6164,"children":6165},{"style":401},[6166],{"type":41,"value":4053},{"type":35,"tag":247,"props":6168,"children":6169},{"style":280},[6170],{"type":41,"value":982},{"type":35,"tag":247,"props":6172,"children":6173},{"class":249,"line":412},[6174,6179,6183,6188,6192,6197,6202,6206],{"type":35,"tag":247,"props":6175,"children":6176},{"style":401},[6177],{"type":41,"value":6178},"    COUNT",{"type":35,"tag":247,"props":6180,"children":6181},{"style":280},[6182],{"type":41,"value":897},{"type":35,"tag":247,"props":6184,"children":6185},{"style":401},[6186],{"type":41,"value":6187},"o",{"type":35,"tag":247,"props":6189,"children":6190},{"style":280},[6191],{"type":41,"value":3692},{"type":35,"tag":247,"props":6193,"children":6194},{"style":401},[6195],{"type":41,"value":6196},"order_id",{"type":35,"tag":247,"props":6198,"children":6199},{"style":280},[6200],{"type":41,"value":6201},")     ",{"type":35,"tag":247,"props":6203,"children":6204},{"style":254},[6205],{"type":41,"value":5949},{"type":35,"tag":247,"props":6207,"children":6208},{"style":280},[6209],{"type":41,"value":6210}," order_count,\n",{"type":35,"tag":247,"props":6212,"children":6213},{"class":249,"line":454},[6214,6219,6223,6227,6231,6236,6241,6245],{"type":35,"tag":247,"props":6215,"children":6216},{"style":401},[6217],{"type":41,"value":6218},"    SUM",{"type":35,"tag":247,"props":6220,"children":6221},{"style":280},[6222],{"type":41,"value":897},{"type":35,"tag":247,"props":6224,"children":6225},{"style":401},[6226],{"type":41,"value":6187},{"type":35,"tag":247,"props":6228,"children":6229},{"style":280},[6230],{"type":41,"value":3692},{"type":35,"tag":247,"props":6232,"children":6233},{"style":401},[6234],{"type":41,"value":6235},"total_amount",{"type":35,"tag":247,"props":6237,"children":6238},{"style":280},[6239],{"type":41,"value":6240},")   ",{"type":35,"tag":247,"props":6242,"children":6243},{"style":254},[6244],{"type":41,"value":5949},{"type":35,"tag":247,"props":6246,"children":6247},{"style":280},[6248],{"type":41,"value":6249}," total_spent\n",{"type":35,"tag":247,"props":6251,"children":6252},{"class":249,"line":496},[6253,6257],{"type":35,"tag":247,"props":6254,"children":6255},{"style":254},[6256],{"type":41,"value":6037},{"type":35,"tag":247,"props":6258,"children":6259},{"style":280},[6260],{"type":41,"value":6261}," customers c\n",{"type":35,"tag":247,"props":6263,"children":6264},{"class":249,"line":553},[6265,6270,6275,6280,6285,6289,6293,6297,6302,6306],{"type":35,"tag":247,"props":6266,"children":6267},{"style":254},[6268],{"type":41,"value":6269},"LEFT JOIN",{"type":35,"tag":247,"props":6271,"children":6272},{"style":280},[6273],{"type":41,"value":6274}," orders o ",{"type":35,"tag":247,"props":6276,"children":6277},{"style":254},[6278],{"type":41,"value":6279},"ON",{"type":35,"tag":247,"props":6281,"children":6282},{"style":401},[6283],{"type":41,"value":6284}," c",{"type":35,"tag":247,"props":6286,"children":6287},{"style":280},[6288],{"type":41,"value":3692},{"type":35,"tag":247,"props":6290,"children":6291},{"style":401},[6292],{"type":41,"value":6147},{"type":35,"tag":247,"props":6294,"children":6295},{"style":254},[6296],{"type":41,"value":830},{"type":35,"tag":247,"props":6298,"children":6299},{"style":401},[6300],{"type":41,"value":6301}," o",{"type":35,"tag":247,"props":6303,"children":6304},{"style":280},[6305],{"type":41,"value":3692},{"type":35,"tag":247,"props":6307,"children":6308},{"style":401},[6309],{"type":41,"value":6310},"customer_id\n",{"type":35,"tag":247,"props":6312,"children":6313},{"class":249,"line":595},[6314,6319,6323,6327,6332,6337],{"type":35,"tag":247,"props":6315,"children":6316},{"style":254},[6317],{"type":41,"value":6318},"WHERE",{"type":35,"tag":247,"props":6320,"children":6321},{"style":401},[6322],{"type":41,"value":6284},{"type":35,"tag":247,"props":6324,"children":6325},{"style":280},[6326],{"type":41,"value":3692},{"type":35,"tag":247,"props":6328,"children":6329},{"style":401},[6330],{"type":41,"value":6331},"signup_date",{"type":35,"tag":247,"props":6333,"children":6334},{"style":254},[6335],{"type":41,"value":6336}," >",{"type":35,"tag":247,"props":6338,"children":6339},{"style":1478},[6340],{"type":41,"value":6341}," '2024-01-01'\n",{"type":35,"tag":247,"props":6343,"children":6344},{"class":249,"line":646},[6345,6350,6354,6358,6362,6366,6371,6375],{"type":35,"tag":247,"props":6346,"children":6347},{"style":254},[6348],{"type":41,"value":6349},"GROUP BY",{"type":35,"tag":247,"props":6351,"children":6352},{"style":401},[6353],{"type":41,"value":6284},{"type":35,"tag":247,"props":6355,"children":6356},{"style":280},[6357],{"type":41,"value":3692},{"type":35,"tag":247,"props":6359,"children":6360},{"style":401},[6361],{"type":41,"value":6147},{"type":35,"tag":247,"props":6363,"children":6364},{"style":280},[6365],{"type":41,"value":815},{"type":35,"tag":247,"props":6367,"children":6368},{"style":401},[6369],{"type":41,"value":6370},"c",{"type":35,"tag":247,"props":6372,"children":6373},{"style":280},[6374],{"type":41,"value":3692},{"type":35,"tag":247,"props":6376,"children":6377},{"style":401},[6378],{"type":41,"value":6379},"name\n",{"type":35,"tag":247,"props":6381,"children":6382},{"class":249,"line":918},[6383,6387,6392],{"type":35,"tag":247,"props":6384,"children":6385},{"style":254},[6386],{"type":41,"value":6050},{"type":35,"tag":247,"props":6388,"children":6389},{"style":280},[6390],{"type":41,"value":6391}," total_spent ",{"type":35,"tag":247,"props":6393,"children":6394},{"style":254},[6395],{"type":41,"value":6060},{"type":35,"tag":247,"props":6397,"children":6398},{"class":249,"line":944},[6399,6403,6408],{"type":35,"tag":247,"props":6400,"children":6401},{"style":254},[6402],{"type":41,"value":6068},{"type":35,"tag":247,"props":6404,"children":6405},{"style":401},[6406],{"type":41,"value":6407}," 100",{"type":35,"tag":247,"props":6409,"children":6410},{"style":280},[6411],{"type":41,"value":409},{"type":35,"tag":44,"props":6413,"children":6414},{},[6415],{"type":41,"value":6416},"Red flags in the output:",{"type":35,"tag":2939,"props":6418,"children":6419},{},[6420,6431,6458],{"type":35,"tag":183,"props":6421,"children":6422},{},[6423,6429],{"type":35,"tag":194,"props":6424,"children":6426},{"className":6425},[],[6427],{"type":41,"value":6428},"Seq Scan",{"type":41,"value":6430}," on a large table — almost always an index opportunity",{"type":35,"tag":183,"props":6432,"children":6433},{},[6434,6440,6442,6448,6450,6456],{"type":35,"tag":194,"props":6435,"children":6437},{"className":6436},[],[6438],{"type":41,"value":6439},"Hash Join",{"type":41,"value":6441}," with large ",{"type":35,"tag":194,"props":6443,"children":6445},{"className":6444},[],[6446],{"type":41,"value":6447},"Batches",{"type":41,"value":6449}," — memory pressure, increase ",{"type":35,"tag":194,"props":6451,"children":6453},{"className":6452},[],[6454],{"type":41,"value":6455},"work_mem",{"type":41,"value":6457}," or add an index",{"type":35,"tag":183,"props":6459,"children":6460},{},[6461,6463,6469],{"type":41,"value":6462},"High ",{"type":35,"tag":194,"props":6464,"children":6466},{"className":6465},[],[6467],{"type":41,"value":6468},"Buffers: shared read",{"type":41,"value":6470}," — data not in cache, consider a covering index",{"type":35,"tag":3769,"props":6472,"children":6474},{"id":6473},"stop-using-select",[6475],{"type":41,"value":6476},"Stop Using SELECT *",{"type":35,"tag":44,"props":6478,"children":6479},{},[6480],{"type":41,"value":6481},"This single habit kills performance in multiple ways: it fetches columns you'll never use, prevents covering-index optimisation, and bloats network payloads.",{"type":35,"tag":237,"props":6483,"children":6485},{"className":5874,"code":6484,"language":5876,"meta":7,"style":7},"-- ❌ Fetches all 22 columns including large TEXT fields\nSELECT * FROM products WHERE category_id = 5;\n\n-- ✅ Fetches exactly what the UI renders\nSELECT product_id, name, price, stock_qty\nFROM products\nWHERE category_id = 5;\n",[6486],{"type":35,"tag":194,"props":6487,"children":6488},{"__ignoreMap":7},[6489,6497,6541,6548,6556,6577,6589],{"type":35,"tag":247,"props":6490,"children":6491},{"class":249,"line":250},[6492],{"type":35,"tag":247,"props":6493,"children":6494},{"style":876},[6495],{"type":41,"value":6496},"-- ❌ Fetches all 22 columns including large TEXT fields\n",{"type":35,"tag":247,"props":6498,"children":6499},{"class":249,"line":276},[6500,6505,6510,6515,6520,6524,6529,6533,6537],{"type":35,"tag":247,"props":6501,"children":6502},{"style":254},[6503],{"type":41,"value":6504},"SELECT",{"type":35,"tag":247,"props":6506,"children":6507},{"style":254},[6508],{"type":41,"value":6509}," *",{"type":35,"tag":247,"props":6511,"children":6512},{"style":254},[6513],{"type":41,"value":6514}," FROM",{"type":35,"tag":247,"props":6516,"children":6517},{"style":280},[6518],{"type":41,"value":6519}," products ",{"type":35,"tag":247,"props":6521,"children":6522},{"style":254},[6523],{"type":41,"value":6318},{"type":35,"tag":247,"props":6525,"children":6526},{"style":280},[6527],{"type":41,"value":6528}," category_id ",{"type":35,"tag":247,"props":6530,"children":6531},{"style":254},[6532],{"type":41,"value":337},{"type":35,"tag":247,"props":6534,"children":6535},{"style":401},[6536],{"type":41,"value":2378},{"type":35,"tag":247,"props":6538,"children":6539},{"style":280},[6540],{"type":41,"value":409},{"type":35,"tag":247,"props":6542,"children":6543},{"class":249,"line":286},[6544],{"type":35,"tag":247,"props":6545,"children":6546},{"emptyLinePlaceholder":762},[6547],{"type":41,"value":765},{"type":35,"tag":247,"props":6549,"children":6550},{"class":249,"line":355},[6551],{"type":35,"tag":247,"props":6552,"children":6553},{"style":876},[6554],{"type":41,"value":6555},"-- ✅ Fetches exactly what the UI renders\n",{"type":35,"tag":247,"props":6557,"children":6558},{"class":249,"line":412},[6559,6563,6568,6572],{"type":35,"tag":247,"props":6560,"children":6561},{"style":254},[6562],{"type":41,"value":6504},{"type":35,"tag":247,"props":6564,"children":6565},{"style":280},[6566],{"type":41,"value":6567}," product_id, ",{"type":35,"tag":247,"props":6569,"children":6570},{"style":254},[6571],{"type":41,"value":4053},{"type":35,"tag":247,"props":6573,"children":6574},{"style":280},[6575],{"type":41,"value":6576},", price, stock_qty\n",{"type":35,"tag":247,"props":6578,"children":6579},{"class":249,"line":454},[6580,6584],{"type":35,"tag":247,"props":6581,"children":6582},{"style":254},[6583],{"type":41,"value":6037},{"type":35,"tag":247,"props":6585,"children":6586},{"style":280},[6587],{"type":41,"value":6588}," products\n",{"type":35,"tag":247,"props":6590,"children":6591},{"class":249,"line":496},[6592,6596,6600,6604,6608],{"type":35,"tag":247,"props":6593,"children":6594},{"style":254},[6595],{"type":41,"value":6318},{"type":35,"tag":247,"props":6597,"children":6598},{"style":280},[6599],{"type":41,"value":6528},{"type":35,"tag":247,"props":6601,"children":6602},{"style":254},[6603],{"type":41,"value":337},{"type":35,"tag":247,"props":6605,"children":6606},{"style":401},[6607],{"type":41,"value":2378},{"type":35,"tag":247,"props":6609,"children":6610},{"style":280},[6611],{"type":41,"value":409},{"type":35,"tag":3769,"props":6613,"children":6615},{"id":6614},"rewrite-correlated-subqueries-as-joins",[6616],{"type":41,"value":6617},"Rewrite Correlated Subqueries as Joins",{"type":35,"tag":44,"props":6619,"children":6620},{},[6621],{"type":41,"value":6622},"Correlated subqueries execute once per row of the outer query. On a table with 500,000 rows, a correlated subquery that takes 0.5ms runs for 250 seconds total.",{"type":35,"tag":237,"props":6624,"children":6626},{"className":5874,"code":6625,"language":5876,"meta":7,"style":7},"-- ❌ Correlated subquery — O(n) database calls\nSELECT name,\n  (SELECT MAX(order_date) FROM orders WHERE customer_id = c.id) AS last_order\nFROM customers c;\n\n-- ✅ Single-pass join\nSELECT c.name, o.last_order\nFROM customers c\nLEFT JOIN (\n  SELECT customer_id, MAX(order_date) AS last_order\n  FROM orders\n  GROUP BY customer_id\n) o ON c.id = o.customer_id;\n",[6627],{"type":35,"tag":194,"props":6628,"children":6629},{"__ignoreMap":7},[6630,6638,6654,6724,6736,6743,6751,6787,6798,6810,6840,6853,6866],{"type":35,"tag":247,"props":6631,"children":6632},{"class":249,"line":250},[6633],{"type":35,"tag":247,"props":6634,"children":6635},{"style":876},[6636],{"type":41,"value":6637},"-- ❌ Correlated subquery — O(n) database calls\n",{"type":35,"tag":247,"props":6639,"children":6640},{"class":249,"line":276},[6641,6645,6650],{"type":35,"tag":247,"props":6642,"children":6643},{"style":254},[6644],{"type":41,"value":6504},{"type":35,"tag":247,"props":6646,"children":6647},{"style":254},[6648],{"type":41,"value":6649}," name",{"type":35,"tag":247,"props":6651,"children":6652},{"style":280},[6653],{"type":41,"value":982},{"type":35,"tag":247,"props":6655,"children":6656},{"class":249,"line":286},[6657,6662,6666,6671,6676,6680,6685,6689,6694,6698,6702,6706,6711,6715,6719],{"type":35,"tag":247,"props":6658,"children":6659},{"style":280},[6660],{"type":41,"value":6661},"  (",{"type":35,"tag":247,"props":6663,"children":6664},{"style":254},[6665],{"type":41,"value":6504},{"type":35,"tag":247,"props":6667,"children":6668},{"style":401},[6669],{"type":41,"value":6670}," MAX",{"type":35,"tag":247,"props":6672,"children":6673},{"style":280},[6674],{"type":41,"value":6675},"(order_date) ",{"type":35,"tag":247,"props":6677,"children":6678},{"style":254},[6679],{"type":41,"value":6037},{"type":35,"tag":247,"props":6681,"children":6682},{"style":280},[6683],{"type":41,"value":6684}," orders ",{"type":35,"tag":247,"props":6686,"children":6687},{"style":254},[6688],{"type":41,"value":6318},{"type":35,"tag":247,"props":6690,"children":6691},{"style":280},[6692],{"type":41,"value":6693}," customer_id ",{"type":35,"tag":247,"props":6695,"children":6696},{"style":254},[6697],{"type":41,"value":337},{"type":35,"tag":247,"props":6699,"children":6700},{"style":401},[6701],{"type":41,"value":6284},{"type":35,"tag":247,"props":6703,"children":6704},{"style":280},[6705],{"type":41,"value":3692},{"type":35,"tag":247,"props":6707,"children":6708},{"style":401},[6709],{"type":41,"value":6710},"id",{"type":35,"tag":247,"props":6712,"children":6713},{"style":280},[6714],{"type":41,"value":5944},{"type":35,"tag":247,"props":6716,"children":6717},{"style":254},[6718],{"type":41,"value":5949},{"type":35,"tag":247,"props":6720,"children":6721},{"style":280},[6722],{"type":41,"value":6723}," last_order\n",{"type":35,"tag":247,"props":6725,"children":6726},{"class":249,"line":355},[6727,6731],{"type":35,"tag":247,"props":6728,"children":6729},{"style":254},[6730],{"type":41,"value":6037},{"type":35,"tag":247,"props":6732,"children":6733},{"style":280},[6734],{"type":41,"value":6735}," customers c;\n",{"type":35,"tag":247,"props":6737,"children":6738},{"class":249,"line":412},[6739],{"type":35,"tag":247,"props":6740,"children":6741},{"emptyLinePlaceholder":762},[6742],{"type":41,"value":765},{"type":35,"tag":247,"props":6744,"children":6745},{"class":249,"line":454},[6746],{"type":35,"tag":247,"props":6747,"children":6748},{"style":876},[6749],{"type":41,"value":6750},"-- ✅ Single-pass join\n",{"type":35,"tag":247,"props":6752,"children":6753},{"class":249,"line":496},[6754,6758,6762,6766,6770,6774,6778,6782],{"type":35,"tag":247,"props":6755,"children":6756},{"style":254},[6757],{"type":41,"value":6504},{"type":35,"tag":247,"props":6759,"children":6760},{"style":401},[6761],{"type":41,"value":6284},{"type":35,"tag":247,"props":6763,"children":6764},{"style":280},[6765],{"type":41,"value":3692},{"type":35,"tag":247,"props":6767,"children":6768},{"style":401},[6769],{"type":41,"value":4053},{"type":35,"tag":247,"props":6771,"children":6772},{"style":280},[6773],{"type":41,"value":815},{"type":35,"tag":247,"props":6775,"children":6776},{"style":401},[6777],{"type":41,"value":6187},{"type":35,"tag":247,"props":6779,"children":6780},{"style":280},[6781],{"type":41,"value":3692},{"type":35,"tag":247,"props":6783,"children":6784},{"style":401},[6785],{"type":41,"value":6786},"last_order\n",{"type":35,"tag":247,"props":6788,"children":6789},{"class":249,"line":553},[6790,6794],{"type":35,"tag":247,"props":6791,"children":6792},{"style":254},[6793],{"type":41,"value":6037},{"type":35,"tag":247,"props":6795,"children":6796},{"style":280},[6797],{"type":41,"value":6261},{"type":35,"tag":247,"props":6799,"children":6800},{"class":249,"line":595},[6801,6805],{"type":35,"tag":247,"props":6802,"children":6803},{"style":254},[6804],{"type":41,"value":6269},{"type":35,"tag":247,"props":6806,"children":6807},{"style":280},[6808],{"type":41,"value":6809}," (\n",{"type":35,"tag":247,"props":6811,"children":6812},{"class":249,"line":646},[6813,6818,6823,6828,6832,6836],{"type":35,"tag":247,"props":6814,"children":6815},{"style":254},[6816],{"type":41,"value":6817},"  SELECT",{"type":35,"tag":247,"props":6819,"children":6820},{"style":280},[6821],{"type":41,"value":6822}," customer_id, ",{"type":35,"tag":247,"props":6824,"children":6825},{"style":401},[6826],{"type":41,"value":6827},"MAX",{"type":35,"tag":247,"props":6829,"children":6830},{"style":280},[6831],{"type":41,"value":6675},{"type":35,"tag":247,"props":6833,"children":6834},{"style":254},[6835],{"type":41,"value":5949},{"type":35,"tag":247,"props":6837,"children":6838},{"style":280},[6839],{"type":41,"value":6723},{"type":35,"tag":247,"props":6841,"children":6842},{"class":249,"line":918},[6843,6848],{"type":35,"tag":247,"props":6844,"children":6845},{"style":254},[6846],{"type":41,"value":6847},"  FROM",{"type":35,"tag":247,"props":6849,"children":6850},{"style":280},[6851],{"type":41,"value":6852}," orders\n",{"type":35,"tag":247,"props":6854,"children":6855},{"class":249,"line":944},[6856,6861],{"type":35,"tag":247,"props":6857,"children":6858},{"style":254},[6859],{"type":41,"value":6860},"  GROUP BY",{"type":35,"tag":247,"props":6862,"children":6863},{"style":280},[6864],{"type":41,"value":6865}," customer_id\n",{"type":35,"tag":247,"props":6867,"children":6868},{"class":249,"line":985},[6869,6874,6878,6882,6886,6890,6894,6898,6902,6906],{"type":35,"tag":247,"props":6870,"children":6871},{"style":280},[6872],{"type":41,"value":6873},") o ",{"type":35,"tag":247,"props":6875,"children":6876},{"style":254},[6877],{"type":41,"value":6279},{"type":35,"tag":247,"props":6879,"children":6880},{"style":401},[6881],{"type":41,"value":6284},{"type":35,"tag":247,"props":6883,"children":6884},{"style":280},[6885],{"type":41,"value":3692},{"type":35,"tag":247,"props":6887,"children":6888},{"style":401},[6889],{"type":41,"value":6710},{"type":35,"tag":247,"props":6891,"children":6892},{"style":254},[6893],{"type":41,"value":830},{"type":35,"tag":247,"props":6895,"children":6896},{"style":401},[6897],{"type":41,"value":6301},{"type":35,"tag":247,"props":6899,"children":6900},{"style":280},[6901],{"type":41,"value":3692},{"type":35,"tag":247,"props":6903,"children":6904},{"style":401},[6905],{"type":41,"value":6147},{"type":35,"tag":247,"props":6907,"children":6908},{"style":280},[6909],{"type":41,"value":409},{"type":35,"tag":36,"props":6911,"children":6913},{"id":6912},"indexing-strategy",[6914],{"type":41,"value":6915},"Indexing Strategy",{"type":35,"tag":44,"props":6917,"children":6918},{},[6919],{"type":41,"value":6920},"Indexes are the single highest-leverage tool in your optimisation arsenal—but only when used intentionally.",{"type":35,"tag":3769,"props":6922,"children":6924},{"id":6923},"the-index-decision-framework",[6925],{"type":41,"value":6926},"The Index Decision Framework",{"type":35,"tag":44,"props":6928,"children":6929},{},[6930],{"type":41,"value":6931},"Create an index when:",{"type":35,"tag":179,"props":6933,"children":6934},{},[6935,6961,6966,6971],{"type":35,"tag":183,"props":6936,"children":6937},{},[6938,6940,6945,6946,6952,6954,6959],{"type":41,"value":6939},"The column appears in a ",{"type":35,"tag":194,"props":6941,"children":6943},{"className":6942},[],[6944],{"type":41,"value":6318},{"type":41,"value":815},{"type":35,"tag":194,"props":6947,"children":6949},{"className":6948},[],[6950],{"type":41,"value":6951},"JOIN ON",{"type":41,"value":6953},", or ",{"type":35,"tag":194,"props":6955,"children":6957},{"className":6956},[],[6958],{"type":41,"value":6050},{"type":41,"value":6960}," clause",{"type":35,"tag":183,"props":6962,"children":6963},{},[6964],{"type":41,"value":6965},"The column has high cardinality (many distinct values)",{"type":35,"tag":183,"props":6967,"children":6968},{},[6969],{"type":41,"value":6970},"The table has more than ~10,000 rows",{"type":35,"tag":183,"props":6972,"children":6973},{},[6974],{"type":41,"value":6975},"The read/write ratio for this table favours reads",{"type":35,"tag":44,"props":6977,"children":6978},{},[6979],{"type":41,"value":6980},"Avoid indexes when:",{"type":35,"tag":2939,"props":6982,"children":6983},{},[6984,6989,7002],{"type":35,"tag":183,"props":6985,"children":6986},{},[6987],{"type":41,"value":6988},"The table is write-heavy (each index slows every INSERT/UPDATE/DELETE)",{"type":35,"tag":183,"props":6990,"children":6991},{},[6992,6994,7000],{"type":41,"value":6993},"The column has very low cardinality (e.g., a boolean ",{"type":35,"tag":194,"props":6995,"children":6997},{"className":6996},[],[6998],{"type":41,"value":6999},"is_active",{"type":41,"value":7001},")",{"type":35,"tag":183,"props":7003,"children":7004},{},[7005],{"type":41,"value":7006},"The query planner already uses a more selective index",{"type":35,"tag":3769,"props":7008,"children":7010},{"id":7009},"covering-indexes-eliminate-table-lookups",[7011],{"type":41,"value":7012},"Covering Indexes Eliminate Table Lookups",{"type":35,"tag":44,"props":7014,"children":7015},{},[7016],{"type":41,"value":7017},"A covering index includes all columns a query needs, so PostgreSQL never touches the main table:",{"type":35,"tag":237,"props":7019,"children":7021},{"className":5874,"code":7020,"language":5876,"meta":7,"style":7},"-- Query: find a customer's recent orders by status\nSELECT order_id, order_date, total_amount\nFROM orders\nWHERE customer_id = 12345\n  AND status = 'pending'\nORDER BY order_date DESC;\n\n-- Covering index — all queried columns live in the index\nCREATE INDEX idx_orders_customer_status_date_amount\n  ON orders (customer_id, status, order_date DESC)\n  INCLUDE (total_amount);\n",[7022],{"type":35,"tag":194,"props":7023,"children":7024},{"__ignoreMap":7},[7025,7033,7045,7056,7076,7098,7119,7126,7134,7152,7183],{"type":35,"tag":247,"props":7026,"children":7027},{"class":249,"line":250},[7028],{"type":35,"tag":247,"props":7029,"children":7030},{"style":876},[7031],{"type":41,"value":7032},"-- Query: find a customer's recent orders by status\n",{"type":35,"tag":247,"props":7034,"children":7035},{"class":249,"line":276},[7036,7040],{"type":35,"tag":247,"props":7037,"children":7038},{"style":254},[7039],{"type":41,"value":6504},{"type":35,"tag":247,"props":7041,"children":7042},{"style":280},[7043],{"type":41,"value":7044}," order_id, order_date, total_amount\n",{"type":35,"tag":247,"props":7046,"children":7047},{"class":249,"line":286},[7048,7052],{"type":35,"tag":247,"props":7049,"children":7050},{"style":254},[7051],{"type":41,"value":6037},{"type":35,"tag":247,"props":7053,"children":7054},{"style":280},[7055],{"type":41,"value":6852},{"type":35,"tag":247,"props":7057,"children":7058},{"class":249,"line":355},[7059,7063,7067,7071],{"type":35,"tag":247,"props":7060,"children":7061},{"style":254},[7062],{"type":41,"value":6318},{"type":35,"tag":247,"props":7064,"children":7065},{"style":280},[7066],{"type":41,"value":6693},{"type":35,"tag":247,"props":7068,"children":7069},{"style":254},[7070],{"type":41,"value":337},{"type":35,"tag":247,"props":7072,"children":7073},{"style":401},[7074],{"type":41,"value":7075}," 12345\n",{"type":35,"tag":247,"props":7077,"children":7078},{"class":249,"line":412},[7079,7084,7089,7093],{"type":35,"tag":247,"props":7080,"children":7081},{"style":254},[7082],{"type":41,"value":7083},"  AND",{"type":35,"tag":247,"props":7085,"children":7086},{"style":254},[7087],{"type":41,"value":7088}," status",{"type":35,"tag":247,"props":7090,"children":7091},{"style":254},[7092],{"type":41,"value":830},{"type":35,"tag":247,"props":7094,"children":7095},{"style":1478},[7096],{"type":41,"value":7097}," 'pending'\n",{"type":35,"tag":247,"props":7099,"children":7100},{"class":249,"line":454},[7101,7105,7110,7115],{"type":35,"tag":247,"props":7102,"children":7103},{"style":254},[7104],{"type":41,"value":6050},{"type":35,"tag":247,"props":7106,"children":7107},{"style":280},[7108],{"type":41,"value":7109}," order_date ",{"type":35,"tag":247,"props":7111,"children":7112},{"style":254},[7113],{"type":41,"value":7114},"DESC",{"type":35,"tag":247,"props":7116,"children":7117},{"style":280},[7118],{"type":41,"value":409},{"type":35,"tag":247,"props":7120,"children":7121},{"class":249,"line":496},[7122],{"type":35,"tag":247,"props":7123,"children":7124},{"emptyLinePlaceholder":762},[7125],{"type":41,"value":765},{"type":35,"tag":247,"props":7127,"children":7128},{"class":249,"line":553},[7129],{"type":35,"tag":247,"props":7130,"children":7131},{"style":876},[7132],{"type":41,"value":7133},"-- Covering index — all queried columns live in the index\n",{"type":35,"tag":247,"props":7135,"children":7136},{"class":249,"line":595},[7137,7142,7147],{"type":35,"tag":247,"props":7138,"children":7139},{"style":254},[7140],{"type":41,"value":7141},"CREATE",{"type":35,"tag":247,"props":7143,"children":7144},{"style":254},[7145],{"type":41,"value":7146}," INDEX",{"type":35,"tag":247,"props":7148,"children":7149},{"style":270},[7150],{"type":41,"value":7151}," idx_orders_customer_status_date_amount\n",{"type":35,"tag":247,"props":7153,"children":7154},{"class":249,"line":646},[7155,7160,7165,7170,7175,7179],{"type":35,"tag":247,"props":7156,"children":7157},{"style":254},[7158],{"type":41,"value":7159},"  ON",{"type":35,"tag":247,"props":7161,"children":7162},{"style":280},[7163],{"type":41,"value":7164}," orders (customer_id, ",{"type":35,"tag":247,"props":7166,"children":7167},{"style":254},[7168],{"type":41,"value":7169},"status",{"type":35,"tag":247,"props":7171,"children":7172},{"style":280},[7173],{"type":41,"value":7174},", order_date ",{"type":35,"tag":247,"props":7176,"children":7177},{"style":254},[7178],{"type":41,"value":7114},{"type":35,"tag":247,"props":7180,"children":7181},{"style":280},[7182],{"type":41,"value":840},{"type":35,"tag":247,"props":7184,"children":7185},{"class":249,"line":918},[7186,7191],{"type":35,"tag":247,"props":7187,"children":7188},{"style":254},[7189],{"type":41,"value":7190},"  INCLUDE",{"type":35,"tag":247,"props":7192,"children":7193},{"style":280},[7194],{"type":41,"value":7195}," (total_amount);\n",{"type":35,"tag":44,"props":7197,"children":7198},{},[7199,7200,7206,7208,7213],{"type":41,"value":681},{"type":35,"tag":194,"props":7201,"children":7203},{"className":7202},[],[7204],{"type":41,"value":7205},"INCLUDE",{"type":41,"value":7207}," clause (PostgreSQL 11+) adds ",{"type":35,"tag":194,"props":7209,"children":7211},{"className":7210},[],[7212],{"type":41,"value":6235},{"type":41,"value":7214}," to leaf pages without affecting sort order, making this a true zero-heap-access query.",{"type":35,"tag":3769,"props":7216,"children":7218},{"id":7217},"partial-indexes-for-selective-conditions",[7219],{"type":41,"value":7220},"Partial Indexes for Selective Conditions",{"type":35,"tag":44,"props":7222,"children":7223},{},[7224],{"type":41,"value":7225},"When you only ever query a subset of rows, index only that subset:",{"type":35,"tag":237,"props":7227,"children":7229},{"className":5874,"code":7228,"language":5876,"meta":7,"style":7},"-- Only active, unfulfilled orders matter for the operations dashboard\nCREATE INDEX idx_orders_unfulfilled\n  ON orders (customer_id, created_at)\n  WHERE status IN ('pending', 'processing');\n",[7230],{"type":35,"tag":194,"props":7231,"children":7232},{"__ignoreMap":7},[7233,7241,7257,7269],{"type":35,"tag":247,"props":7234,"children":7235},{"class":249,"line":250},[7236],{"type":35,"tag":247,"props":7237,"children":7238},{"style":876},[7239],{"type":41,"value":7240},"-- Only active, unfulfilled orders matter for the operations dashboard\n",{"type":35,"tag":247,"props":7242,"children":7243},{"class":249,"line":276},[7244,7248,7252],{"type":35,"tag":247,"props":7245,"children":7246},{"style":254},[7247],{"type":41,"value":7141},{"type":35,"tag":247,"props":7249,"children":7250},{"style":254},[7251],{"type":41,"value":7146},{"type":35,"tag":247,"props":7253,"children":7254},{"style":270},[7255],{"type":41,"value":7256}," idx_orders_unfulfilled\n",{"type":35,"tag":247,"props":7258,"children":7259},{"class":249,"line":286},[7260,7264],{"type":35,"tag":247,"props":7261,"children":7262},{"style":254},[7263],{"type":41,"value":7159},{"type":35,"tag":247,"props":7265,"children":7266},{"style":280},[7267],{"type":41,"value":7268}," orders (customer_id, created_at)\n",{"type":35,"tag":247,"props":7270,"children":7271},{"class":249,"line":355},[7272,7277,7281,7286,7290,7295,7299,7304],{"type":35,"tag":247,"props":7273,"children":7274},{"style":254},[7275],{"type":41,"value":7276},"  WHERE",{"type":35,"tag":247,"props":7278,"children":7279},{"style":254},[7280],{"type":41,"value":7088},{"type":35,"tag":247,"props":7282,"children":7283},{"style":254},[7284],{"type":41,"value":7285}," IN",{"type":35,"tag":247,"props":7287,"children":7288},{"style":280},[7289],{"type":41,"value":1216},{"type":35,"tag":247,"props":7291,"children":7292},{"style":1478},[7293],{"type":41,"value":7294},"'pending'",{"type":35,"tag":247,"props":7296,"children":7297},{"style":280},[7298],{"type":41,"value":815},{"type":35,"tag":247,"props":7300,"children":7301},{"style":1478},[7302],{"type":41,"value":7303},"'processing'",{"type":35,"tag":247,"props":7305,"children":7306},{"style":280},[7307],{"type":41,"value":7308},");\n",{"type":35,"tag":44,"props":7310,"children":7311},{},[7312],{"type":41,"value":7313},"This index is a fraction of the size of a full index on those columns, making it faster to build, cheaper to maintain, and more likely to stay in memory.",{"type":35,"tag":3769,"props":7315,"children":7317},{"id":7316},"prune-dead-indexes",[7318],{"type":41,"value":7319},"Prune Dead Indexes",{"type":35,"tag":44,"props":7321,"children":7322},{},[7323],{"type":41,"value":7324},"Unused indexes are pure cost: they consume disk, slow writes, and confuse the planner. Find them:",{"type":35,"tag":237,"props":7326,"children":7328},{"className":5874,"code":7327,"language":5876,"meta":7,"style":7},"SELECT\n  schemaname,\n  tablename,\n  indexname,\n  idx_scan AS scans_since_restart\nFROM pg_stat_user_indexes\nWHERE idx_scan = 0\n  AND indexrelname NOT LIKE '%_pkey'\nORDER BY schemaname, tablename;\n",[7329],{"type":35,"tag":194,"props":7330,"children":7331},{"__ignoreMap":7},[7332,7339,7347,7355,7363,7380,7392,7413,7440],{"type":35,"tag":247,"props":7333,"children":7334},{"class":249,"line":250},[7335],{"type":35,"tag":247,"props":7336,"children":7337},{"style":254},[7338],{"type":41,"value":5896},{"type":35,"tag":247,"props":7340,"children":7341},{"class":249,"line":276},[7342],{"type":35,"tag":247,"props":7343,"children":7344},{"style":280},[7345],{"type":41,"value":7346},"  schemaname,\n",{"type":35,"tag":247,"props":7348,"children":7349},{"class":249,"line":286},[7350],{"type":35,"tag":247,"props":7351,"children":7352},{"style":280},[7353],{"type":41,"value":7354},"  tablename,\n",{"type":35,"tag":247,"props":7356,"children":7357},{"class":249,"line":355},[7358],{"type":35,"tag":247,"props":7359,"children":7360},{"style":280},[7361],{"type":41,"value":7362},"  indexname,\n",{"type":35,"tag":247,"props":7364,"children":7365},{"class":249,"line":412},[7366,7371,7375],{"type":35,"tag":247,"props":7367,"children":7368},{"style":280},[7369],{"type":41,"value":7370},"  idx_scan ",{"type":35,"tag":247,"props":7372,"children":7373},{"style":254},[7374],{"type":41,"value":5949},{"type":35,"tag":247,"props":7376,"children":7377},{"style":280},[7378],{"type":41,"value":7379}," scans_since_restart\n",{"type":35,"tag":247,"props":7381,"children":7382},{"class":249,"line":454},[7383,7387],{"type":35,"tag":247,"props":7384,"children":7385},{"style":254},[7386],{"type":41,"value":6037},{"type":35,"tag":247,"props":7388,"children":7389},{"style":280},[7390],{"type":41,"value":7391}," pg_stat_user_indexes\n",{"type":35,"tag":247,"props":7393,"children":7394},{"class":249,"line":496},[7395,7399,7404,7408],{"type":35,"tag":247,"props":7396,"children":7397},{"style":254},[7398],{"type":41,"value":6318},{"type":35,"tag":247,"props":7400,"children":7401},{"style":280},[7402],{"type":41,"value":7403}," idx_scan ",{"type":35,"tag":247,"props":7405,"children":7406},{"style":254},[7407],{"type":41,"value":337},{"type":35,"tag":247,"props":7409,"children":7410},{"style":401},[7411],{"type":41,"value":7412}," 0\n",{"type":35,"tag":247,"props":7414,"children":7415},{"class":249,"line":553},[7416,7420,7425,7430,7435],{"type":35,"tag":247,"props":7417,"children":7418},{"style":254},[7419],{"type":41,"value":7083},{"type":35,"tag":247,"props":7421,"children":7422},{"style":280},[7423],{"type":41,"value":7424}," indexrelname ",{"type":35,"tag":247,"props":7426,"children":7427},{"style":254},[7428],{"type":41,"value":7429},"NOT",{"type":35,"tag":247,"props":7431,"children":7432},{"style":254},[7433],{"type":41,"value":7434}," LIKE",{"type":35,"tag":247,"props":7436,"children":7437},{"style":1478},[7438],{"type":41,"value":7439}," '%_pkey'\n",{"type":35,"tag":247,"props":7441,"children":7442},{"class":249,"line":595},[7443,7447],{"type":35,"tag":247,"props":7444,"children":7445},{"style":254},[7446],{"type":41,"value":6050},{"type":35,"tag":247,"props":7448,"children":7449},{"style":280},[7450],{"type":41,"value":7451}," schemaname, tablename;\n",{"type":35,"tag":44,"props":7453,"children":7454},{},[7455],{"type":41,"value":7456},"Drop any index that shows zero scans and wasn't created in the last 24 hours.",{"type":35,"tag":36,"props":7458,"children":7460},{"id":7459},"caching-the-force-multiplier",[7461],{"type":41,"value":7462},"Caching: The Force Multiplier",{"type":35,"tag":44,"props":7464,"children":7465},{},[7466],{"type":41,"value":7467},"Once queries are fast, caching keeps frequently-read data out of the database entirely.",{"type":35,"tag":3769,"props":7469,"children":7471},{"id":7470},"application-level-caching-with-redis",[7472],{"type":41,"value":7473},"Application-Level Caching with Redis",{"type":35,"tag":237,"props":7475,"children":7477},{"className":239,"code":7476,"language":241,"meta":7,"style":7},"public async Task\u003CProduct> GetProductAsync(int id)\n{\n    var cacheKey = $\"product:{id}\";\n\n    var cached = await _cache.GetStringAsync(cacheKey);\n    if (cached is not null)\n        return JsonSerializer.Deserialize\u003CProduct>(cached)!;\n\n    var product = await _db.Products\n        .AsNoTracking()\n        .Include(p => p.Category)\n        .FirstOrDefaultAsync(p => p.Id == id);\n\n    if (product is not null)\n    {\n        await _cache.SetStringAsync(\n            cacheKey,\n            JsonSerializer.Serialize(product),\n            new DistributedCacheEntryOptions\n            {\n                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(15)\n            });\n    }\n\n    return product!;\n}\n",[7478],{"type":35,"tag":194,"props":7479,"children":7480},{"__ignoreMap":7},[7481,7532,7539,7574,7581,7616,7648,7685,7692,7717,7733,7762,7800,7807,7835,7842,7863,7871,7888,7901,7908,7941,7949,7956,7963,7983],{"type":35,"tag":247,"props":7482,"children":7483},{"class":249,"line":250},[7484,7488,7492,7496,7500,7505,7509,7514,7518,7523,7528],{"type":35,"tag":247,"props":7485,"children":7486},{"style":254},[7487],{"type":41,"value":257},{"type":35,"tag":247,"props":7489,"children":7490},{"style":254},[7491],{"type":41,"value":777},{"type":35,"tag":247,"props":7493,"children":7494},{"style":270},[7495],{"type":41,"value":782},{"type":35,"tag":247,"props":7497,"children":7498},{"style":280},[7499],{"type":41,"value":515},{"type":35,"tag":247,"props":7501,"children":7502},{"style":270},[7503],{"type":41,"value":7504},"Product",{"type":35,"tag":247,"props":7506,"children":7507},{"style":280},[7508],{"type":41,"value":525},{"type":35,"tag":247,"props":7510,"children":7511},{"style":270},[7512],{"type":41,"value":7513},"GetProductAsync",{"type":35,"tag":247,"props":7515,"children":7516},{"style":280},[7517],{"type":41,"value":897},{"type":35,"tag":247,"props":7519,"children":7520},{"style":254},[7521],{"type":41,"value":7522},"int",{"type":35,"tag":247,"props":7524,"children":7525},{"style":270},[7526],{"type":41,"value":7527}," id",{"type":35,"tag":247,"props":7529,"children":7530},{"style":280},[7531],{"type":41,"value":840},{"type":35,"tag":247,"props":7533,"children":7534},{"class":249,"line":276},[7535],{"type":35,"tag":247,"props":7536,"children":7537},{"style":280},[7538],{"type":41,"value":283},{"type":35,"tag":247,"props":7540,"children":7541},{"class":249,"line":286},[7542,7547,7552,7556,7561,7565,7570],{"type":35,"tag":247,"props":7543,"children":7544},{"style":254},[7545],{"type":41,"value":7546},"    var",{"type":35,"tag":247,"props":7548,"children":7549},{"style":270},[7550],{"type":41,"value":7551}," cacheKey",{"type":35,"tag":247,"props":7553,"children":7554},{"style":254},[7555],{"type":41,"value":830},{"type":35,"tag":247,"props":7557,"children":7558},{"style":1478},[7559],{"type":41,"value":7560}," $\"product:{",{"type":35,"tag":247,"props":7562,"children":7563},{"style":280},[7564],{"type":41,"value":6710},{"type":35,"tag":247,"props":7566,"children":7567},{"style":1478},[7568],{"type":41,"value":7569},"}\"",{"type":35,"tag":247,"props":7571,"children":7572},{"style":280},[7573],{"type":41,"value":409},{"type":35,"tag":247,"props":7575,"children":7576},{"class":249,"line":355},[7577],{"type":35,"tag":247,"props":7578,"children":7579},{"emptyLinePlaceholder":762},[7580],{"type":41,"value":765},{"type":35,"tag":247,"props":7582,"children":7583},{"class":249,"line":412},[7584,7588,7593,7597,7601,7606,7611],{"type":35,"tag":247,"props":7585,"children":7586},{"style":254},[7587],{"type":41,"value":7546},{"type":35,"tag":247,"props":7589,"children":7590},{"style":270},[7591],{"type":41,"value":7592}," cached",{"type":35,"tag":247,"props":7594,"children":7595},{"style":254},[7596],{"type":41,"value":830},{"type":35,"tag":247,"props":7598,"children":7599},{"style":254},[7600],{"type":41,"value":1254},{"type":35,"tag":247,"props":7602,"children":7603},{"style":280},[7604],{"type":41,"value":7605}," _cache.",{"type":35,"tag":247,"props":7607,"children":7608},{"style":270},[7609],{"type":41,"value":7610},"GetStringAsync",{"type":35,"tag":247,"props":7612,"children":7613},{"style":280},[7614],{"type":41,"value":7615},"(cacheKey);\n",{"type":35,"tag":247,"props":7617,"children":7618},{"class":249,"line":454},[7619,7624,7629,7634,7639,7644],{"type":35,"tag":247,"props":7620,"children":7621},{"style":254},[7622],{"type":41,"value":7623},"    if",{"type":35,"tag":247,"props":7625,"children":7626},{"style":280},[7627],{"type":41,"value":7628}," (cached ",{"type":35,"tag":247,"props":7630,"children":7631},{"style":254},[7632],{"type":41,"value":7633},"is",{"type":35,"tag":247,"props":7635,"children":7636},{"style":254},[7637],{"type":41,"value":7638}," not",{"type":35,"tag":247,"props":7640,"children":7641},{"style":401},[7642],{"type":41,"value":7643}," null",{"type":35,"tag":247,"props":7645,"children":7646},{"style":280},[7647],{"type":41,"value":840},{"type":35,"tag":247,"props":7649,"children":7650},{"class":249,"line":496},[7651,7656,7660,7664,7668,7672,7677,7681],{"type":35,"tag":247,"props":7652,"children":7653},{"style":254},[7654],{"type":41,"value":7655},"        return",{"type":35,"tag":247,"props":7657,"children":7658},{"style":280},[7659],{"type":41,"value":1000},{"type":35,"tag":247,"props":7661,"children":7662},{"style":270},[7663],{"type":41,"value":1954},{"type":35,"tag":247,"props":7665,"children":7666},{"style":280},[7667],{"type":41,"value":515},{"type":35,"tag":247,"props":7669,"children":7670},{"style":270},[7671],{"type":41,"value":7504},{"type":35,"tag":247,"props":7673,"children":7674},{"style":280},[7675],{"type":41,"value":7676},">(cached)",{"type":35,"tag":247,"props":7678,"children":7679},{"style":254},[7680],{"type":41,"value":977},{"type":35,"tag":247,"props":7682,"children":7683},{"style":280},[7684],{"type":41,"value":409},{"type":35,"tag":247,"props":7686,"children":7687},{"class":249,"line":553},[7688],{"type":35,"tag":247,"props":7689,"children":7690},{"emptyLinePlaceholder":762},[7691],{"type":41,"value":765},{"type":35,"tag":247,"props":7693,"children":7694},{"class":249,"line":595},[7695,7699,7704,7708,7712],{"type":35,"tag":247,"props":7696,"children":7697},{"style":254},[7698],{"type":41,"value":7546},{"type":35,"tag":247,"props":7700,"children":7701},{"style":270},[7702],{"type":41,"value":7703}," product",{"type":35,"tag":247,"props":7705,"children":7706},{"style":254},[7707],{"type":41,"value":830},{"type":35,"tag":247,"props":7709,"children":7710},{"style":254},[7711],{"type":41,"value":1254},{"type":35,"tag":247,"props":7713,"children":7714},{"style":280},[7715],{"type":41,"value":7716}," _db.Products\n",{"type":35,"tag":247,"props":7718,"children":7719},{"class":249,"line":646},[7720,7724,7729],{"type":35,"tag":247,"props":7721,"children":7722},{"style":280},[7723],{"type":41,"value":2874},{"type":35,"tag":247,"props":7725,"children":7726},{"style":270},[7727],{"type":41,"value":7728},"AsNoTracking",{"type":35,"tag":247,"props":7730,"children":7731},{"style":280},[7732],{"type":41,"value":1529},{"type":35,"tag":247,"props":7734,"children":7735},{"class":249,"line":918},[7736,7740,7745,7749,7753,7757],{"type":35,"tag":247,"props":7737,"children":7738},{"style":280},[7739],{"type":41,"value":2874},{"type":35,"tag":247,"props":7741,"children":7742},{"style":270},[7743],{"type":41,"value":7744},"Include",{"type":35,"tag":247,"props":7746,"children":7747},{"style":280},[7748],{"type":41,"value":897},{"type":35,"tag":247,"props":7750,"children":7751},{"style":270},[7752],{"type":41,"value":44},{"type":35,"tag":247,"props":7754,"children":7755},{"style":254},[7756],{"type":41,"value":1286},{"type":35,"tag":247,"props":7758,"children":7759},{"style":280},[7760],{"type":41,"value":7761}," p.Category)\n",{"type":35,"tag":247,"props":7763,"children":7764},{"class":249,"line":944},[7765,7769,7774,7778,7782,7786,7791,7795],{"type":35,"tag":247,"props":7766,"children":7767},{"style":280},[7768],{"type":41,"value":2874},{"type":35,"tag":247,"props":7770,"children":7771},{"style":270},[7772],{"type":41,"value":7773},"FirstOrDefaultAsync",{"type":35,"tag":247,"props":7775,"children":7776},{"style":280},[7777],{"type":41,"value":897},{"type":35,"tag":247,"props":7779,"children":7780},{"style":270},[7781],{"type":41,"value":44},{"type":35,"tag":247,"props":7783,"children":7784},{"style":254},[7785],{"type":41,"value":1286},{"type":35,"tag":247,"props":7787,"children":7788},{"style":280},[7789],{"type":41,"value":7790}," p.Id ",{"type":35,"tag":247,"props":7792,"children":7793},{"style":254},[7794],{"type":41,"value":1296},{"type":35,"tag":247,"props":7796,"children":7797},{"style":280},[7798],{"type":41,"value":7799}," id);\n",{"type":35,"tag":247,"props":7801,"children":7802},{"class":249,"line":985},[7803],{"type":35,"tag":247,"props":7804,"children":7805},{"emptyLinePlaceholder":762},[7806],{"type":41,"value":765},{"type":35,"tag":247,"props":7808,"children":7809},{"class":249,"line":1013},[7810,7814,7819,7823,7827,7831],{"type":35,"tag":247,"props":7811,"children":7812},{"style":254},[7813],{"type":41,"value":7623},{"type":35,"tag":247,"props":7815,"children":7816},{"style":280},[7817],{"type":41,"value":7818}," (product ",{"type":35,"tag":247,"props":7820,"children":7821},{"style":254},[7822],{"type":41,"value":7633},{"type":35,"tag":247,"props":7824,"children":7825},{"style":254},[7826],{"type":41,"value":7638},{"type":35,"tag":247,"props":7828,"children":7829},{"style":401},[7830],{"type":41,"value":7643},{"type":35,"tag":247,"props":7832,"children":7833},{"style":280},[7834],{"type":41,"value":840},{"type":35,"tag":247,"props":7836,"children":7837},{"class":249,"line":1031},[7838],{"type":35,"tag":247,"props":7839,"children":7840},{"style":280},[7841],{"type":41,"value":870},{"type":35,"tag":247,"props":7843,"children":7844},{"class":249,"line":1049},[7845,7850,7854,7859],{"type":35,"tag":247,"props":7846,"children":7847},{"style":254},[7848],{"type":41,"value":7849},"        await",{"type":35,"tag":247,"props":7851,"children":7852},{"style":280},[7853],{"type":41,"value":7605},{"type":35,"tag":247,"props":7855,"children":7856},{"style":270},[7857],{"type":41,"value":7858},"SetStringAsync",{"type":35,"tag":247,"props":7860,"children":7861},{"style":280},[7862],{"type":41,"value":1832},{"type":35,"tag":247,"props":7864,"children":7865},{"class":249,"line":1058},[7866],{"type":35,"tag":247,"props":7867,"children":7868},{"style":280},[7869],{"type":41,"value":7870},"            cacheKey,\n",{"type":35,"tag":247,"props":7872,"children":7873},{"class":249,"line":1067},[7874,7879,7883],{"type":35,"tag":247,"props":7875,"children":7876},{"style":280},[7877],{"type":41,"value":7878},"            JsonSerializer.",{"type":35,"tag":247,"props":7880,"children":7881},{"style":270},[7882],{"type":41,"value":1005},{"type":35,"tag":247,"props":7884,"children":7885},{"style":280},[7886],{"type":41,"value":7887},"(product),\n",{"type":35,"tag":247,"props":7889,"children":7890},{"class":249,"line":1076},[7891,7896],{"type":35,"tag":247,"props":7892,"children":7893},{"style":254},[7894],{"type":41,"value":7895},"            new",{"type":35,"tag":247,"props":7897,"children":7898},{"style":270},[7899],{"type":41,"value":7900}," DistributedCacheEntryOptions\n",{"type":35,"tag":247,"props":7902,"children":7903},{"class":249,"line":1532},[7904],{"type":35,"tag":247,"props":7905,"children":7906},{"style":280},[7907],{"type":41,"value":1419},{"type":35,"tag":247,"props":7909,"children":7910},{"class":249,"line":1541},[7911,7916,7920,7924,7929,7933,7937],{"type":35,"tag":247,"props":7912,"children":7913},{"style":280},[7914],{"type":41,"value":7915},"                AbsoluteExpirationRelativeToNow ",{"type":35,"tag":247,"props":7917,"children":7918},{"style":254},[7919],{"type":41,"value":337},{"type":35,"tag":247,"props":7921,"children":7922},{"style":280},[7923],{"type":41,"value":2399},{"type":35,"tag":247,"props":7925,"children":7926},{"style":270},[7927],{"type":41,"value":7928},"FromMinutes",{"type":35,"tag":247,"props":7930,"children":7931},{"style":280},[7932],{"type":41,"value":897},{"type":35,"tag":247,"props":7934,"children":7935},{"style":401},[7936],{"type":41,"value":2746},{"type":35,"tag":247,"props":7938,"children":7939},{"style":280},[7940],{"type":41,"value":840},{"type":35,"tag":247,"props":7942,"children":7943},{"class":249,"line":1549},[7944],{"type":35,"tag":247,"props":7945,"children":7946},{"style":280},[7947],{"type":41,"value":7948},"            });\n",{"type":35,"tag":247,"props":7950,"children":7951},{"class":249,"line":1567},[7952],{"type":35,"tag":247,"props":7953,"children":7954},{"style":280},[7955],{"type":41,"value":1073},{"type":35,"tag":247,"props":7957,"children":7958},{"class":249,"line":1584},[7959],{"type":35,"tag":247,"props":7960,"children":7961},{"emptyLinePlaceholder":762},[7962],{"type":41,"value":765},{"type":35,"tag":247,"props":7964,"children":7965},{"class":249,"line":1593},[7966,7971,7975,7979],{"type":35,"tag":247,"props":7967,"children":7968},{"style":254},[7969],{"type":41,"value":7970},"    return",{"type":35,"tag":247,"props":7972,"children":7973},{"style":280},[7974],{"type":41,"value":7703},{"type":35,"tag":247,"props":7976,"children":7977},{"style":254},[7978],{"type":41,"value":977},{"type":35,"tag":247,"props":7980,"children":7981},{"style":280},[7982],{"type":41,"value":409},{"type":35,"tag":247,"props":7984,"children":7985},{"class":249,"line":1601},[7986],{"type":35,"tag":247,"props":7987,"children":7988},{"style":280},[7989],{"type":41,"value":652},{"type":35,"tag":44,"props":7991,"children":7992},{},[7993],{"type":41,"value":7994},"Cache TTL is the hardest decision. Our rule of thumb: start at half the expected staleness tolerance, then tune based on cache-hit ratio monitoring.",{"type":35,"tag":3769,"props":7996,"children":7998},{"id":7997},"materialised-views-for-analytics",[7999],{"type":41,"value":8000},"Materialised Views for Analytics",{"type":35,"tag":44,"props":8002,"children":8003},{},[8004],{"type":41,"value":8005},"Complex analytical queries over large tables should never run live against OLTP data. Materialise the result:",{"type":35,"tag":237,"props":8007,"children":8009},{"className":5874,"code":8008,"language":5876,"meta":7,"style":7},"CREATE MATERIALIZED VIEW mv_monthly_revenue AS\nSELECT\n    DATE_TRUNC('month', order_date)  AS month,\n    product_category,\n    SUM(amount)                       AS revenue,\n    COUNT(*)                          AS orders\nFROM orders o\nJOIN products p ON o.product_id = p.id\nGROUP BY 1, 2;\n\nCREATE INDEX ON mv_monthly_revenue (month);\n\n-- Refresh nightly (or on-demand after large data loads)\nREFRESH MATERIALIZED VIEW CONCURRENTLY mv_monthly_revenue;\n",[8010],{"type":35,"tag":194,"props":8011,"children":8012},{"__ignoreMap":7},[8013,8030,8037,8068,8076,8097,8126,8138,8186,8209,8216,8246,8253,8261],{"type":35,"tag":247,"props":8014,"children":8015},{"class":249,"line":250},[8016,8020,8025],{"type":35,"tag":247,"props":8017,"children":8018},{"style":254},[8019],{"type":41,"value":7141},{"type":35,"tag":247,"props":8021,"children":8022},{"style":280},[8023],{"type":41,"value":8024}," MATERIALIZED VIEW mv_monthly_revenue ",{"type":35,"tag":247,"props":8026,"children":8027},{"style":254},[8028],{"type":41,"value":8029},"AS\n",{"type":35,"tag":247,"props":8031,"children":8032},{"class":249,"line":276},[8033],{"type":35,"tag":247,"props":8034,"children":8035},{"style":254},[8036],{"type":41,"value":5896},{"type":35,"tag":247,"props":8038,"children":8039},{"class":249,"line":286},[8040,8045,8050,8055,8059,8064],{"type":35,"tag":247,"props":8041,"children":8042},{"style":280},[8043],{"type":41,"value":8044},"    DATE_TRUNC(",{"type":35,"tag":247,"props":8046,"children":8047},{"style":1478},[8048],{"type":41,"value":8049},"'month'",{"type":35,"tag":247,"props":8051,"children":8052},{"style":280},[8053],{"type":41,"value":8054},", order_date)  ",{"type":35,"tag":247,"props":8056,"children":8057},{"style":254},[8058],{"type":41,"value":5949},{"type":35,"tag":247,"props":8060,"children":8061},{"style":254},[8062],{"type":41,"value":8063}," month",{"type":35,"tag":247,"props":8065,"children":8066},{"style":280},[8067],{"type":41,"value":982},{"type":35,"tag":247,"props":8069,"children":8070},{"class":249,"line":355},[8071],{"type":35,"tag":247,"props":8072,"children":8073},{"style":280},[8074],{"type":41,"value":8075},"    product_category,\n",{"type":35,"tag":247,"props":8077,"children":8078},{"class":249,"line":412},[8079,8083,8088,8092],{"type":35,"tag":247,"props":8080,"children":8081},{"style":401},[8082],{"type":41,"value":6218},{"type":35,"tag":247,"props":8084,"children":8085},{"style":280},[8086],{"type":41,"value":8087},"(amount)                       ",{"type":35,"tag":247,"props":8089,"children":8090},{"style":254},[8091],{"type":41,"value":5949},{"type":35,"tag":247,"props":8093,"children":8094},{"style":280},[8095],{"type":41,"value":8096}," revenue,\n",{"type":35,"tag":247,"props":8098,"children":8099},{"class":249,"line":454},[8100,8104,8108,8113,8118,8122],{"type":35,"tag":247,"props":8101,"children":8102},{"style":401},[8103],{"type":41,"value":6178},{"type":35,"tag":247,"props":8105,"children":8106},{"style":280},[8107],{"type":41,"value":897},{"type":35,"tag":247,"props":8109,"children":8110},{"style":254},[8111],{"type":41,"value":8112},"*",{"type":35,"tag":247,"props":8114,"children":8115},{"style":280},[8116],{"type":41,"value":8117},")                          ",{"type":35,"tag":247,"props":8119,"children":8120},{"style":254},[8121],{"type":41,"value":5949},{"type":35,"tag":247,"props":8123,"children":8124},{"style":280},[8125],{"type":41,"value":6852},{"type":35,"tag":247,"props":8127,"children":8128},{"class":249,"line":496},[8129,8133],{"type":35,"tag":247,"props":8130,"children":8131},{"style":254},[8132],{"type":41,"value":6037},{"type":35,"tag":247,"props":8134,"children":8135},{"style":280},[8136],{"type":41,"value":8137}," orders o\n",{"type":35,"tag":247,"props":8139,"children":8140},{"class":249,"line":553},[8141,8146,8151,8155,8159,8163,8168,8172,8177,8181],{"type":35,"tag":247,"props":8142,"children":8143},{"style":254},[8144],{"type":41,"value":8145},"JOIN",{"type":35,"tag":247,"props":8147,"children":8148},{"style":280},[8149],{"type":41,"value":8150}," products p ",{"type":35,"tag":247,"props":8152,"children":8153},{"style":254},[8154],{"type":41,"value":6279},{"type":35,"tag":247,"props":8156,"children":8157},{"style":401},[8158],{"type":41,"value":6301},{"type":35,"tag":247,"props":8160,"children":8161},{"style":280},[8162],{"type":41,"value":3692},{"type":35,"tag":247,"props":8164,"children":8165},{"style":401},[8166],{"type":41,"value":8167},"product_id",{"type":35,"tag":247,"props":8169,"children":8170},{"style":254},[8171],{"type":41,"value":830},{"type":35,"tag":247,"props":8173,"children":8174},{"style":401},[8175],{"type":41,"value":8176}," p",{"type":35,"tag":247,"props":8178,"children":8179},{"style":280},[8180],{"type":41,"value":3692},{"type":35,"tag":247,"props":8182,"children":8183},{"style":401},[8184],{"type":41,"value":8185},"id\n",{"type":35,"tag":247,"props":8187,"children":8188},{"class":249,"line":595},[8189,8193,8197,8201,8205],{"type":35,"tag":247,"props":8190,"children":8191},{"style":254},[8192],{"type":41,"value":6349},{"type":35,"tag":247,"props":8194,"children":8195},{"style":401},[8196],{"type":41,"value":404},{"type":35,"tag":247,"props":8198,"children":8199},{"style":280},[8200],{"type":41,"value":815},{"type":35,"tag":247,"props":8202,"children":8203},{"style":401},[8204],{"type":41,"value":5939},{"type":35,"tag":247,"props":8206,"children":8207},{"style":280},[8208],{"type":41,"value":409},{"type":35,"tag":247,"props":8210,"children":8211},{"class":249,"line":646},[8212],{"type":35,"tag":247,"props":8213,"children":8214},{"emptyLinePlaceholder":762},[8215],{"type":41,"value":765},{"type":35,"tag":247,"props":8217,"children":8218},{"class":249,"line":918},[8219,8223,8227,8232,8237,8242],{"type":35,"tag":247,"props":8220,"children":8221},{"style":254},[8222],{"type":41,"value":7141},{"type":35,"tag":247,"props":8224,"children":8225},{"style":254},[8226],{"type":41,"value":7146},{"type":35,"tag":247,"props":8228,"children":8229},{"style":270},[8230],{"type":41,"value":8231}," ON",{"type":35,"tag":247,"props":8233,"children":8234},{"style":280},[8235],{"type":41,"value":8236}," mv_monthly_revenue (",{"type":35,"tag":247,"props":8238,"children":8239},{"style":254},[8240],{"type":41,"value":8241},"month",{"type":35,"tag":247,"props":8243,"children":8244},{"style":280},[8245],{"type":41,"value":7308},{"type":35,"tag":247,"props":8247,"children":8248},{"class":249,"line":944},[8249],{"type":35,"tag":247,"props":8250,"children":8251},{"emptyLinePlaceholder":762},[8252],{"type":41,"value":765},{"type":35,"tag":247,"props":8254,"children":8255},{"class":249,"line":985},[8256],{"type":35,"tag":247,"props":8257,"children":8258},{"style":876},[8259],{"type":41,"value":8260},"-- Refresh nightly (or on-demand after large data loads)\n",{"type":35,"tag":247,"props":8262,"children":8263},{"class":249,"line":1013},[8264],{"type":35,"tag":247,"props":8265,"children":8266},{"style":280},[8267],{"type":41,"value":8268},"REFRESH MATERIALIZED VIEW CONCURRENTLY mv_monthly_revenue;\n",{"type":35,"tag":44,"props":8270,"children":8271},{},[8272,8278],{"type":35,"tag":194,"props":8273,"children":8275},{"className":8274},[],[8276],{"type":41,"value":8277},"CONCURRENTLY",{"type":41,"value":8279}," lets reads continue during the refresh — zero downtime.",{"type":35,"tag":36,"props":8281,"children":8283},{"id":8282},"real-world-results-e-commerce-platform-optimisation",[8284],{"type":41,"value":8285},"Real-World Results: E-Commerce Platform Optimisation",{"type":35,"tag":44,"props":8287,"children":8288},{},[8289],{"type":41,"value":8290},"An e-commerce client came to us handling 50,000+ daily orders with page timeouts during flash sales. Our four-week audit and remediation:",{"type":35,"tag":66,"props":8292,"children":8293},{},[8294,8310],{"type":35,"tag":70,"props":8295,"children":8296},{},[8297],{"type":35,"tag":74,"props":8298,"children":8299},{},[8300,8305],{"type":35,"tag":78,"props":8301,"children":8302},{},[8303],{"type":41,"value":8304},"Action",{"type":35,"tag":78,"props":8306,"children":8307},{},[8308],{"type":41,"value":8309},"Impact",{"type":35,"tag":94,"props":8311,"children":8312},{},[8313,8326,8339,8352,8365],{"type":35,"tag":74,"props":8314,"children":8315},{},[8316,8321],{"type":35,"tag":101,"props":8317,"children":8318},{},[8319],{"type":41,"value":8320},"Rewrote 15 highest-cost queries",{"type":35,"tag":101,"props":8322,"children":8323},{},[8324],{"type":41,"value":8325},"−60% DB CPU usage",{"type":35,"tag":74,"props":8327,"children":8328},{},[8329,8334],{"type":35,"tag":101,"props":8330,"children":8331},{},[8332],{"type":41,"value":8333},"Added 8 strategic covering indexes",{"type":35,"tag":101,"props":8335,"children":8336},{},[8337],{"type":41,"value":8338},"Avg query time: 1200ms → 85ms",{"type":35,"tag":74,"props":8340,"children":8341},{},[8342,8347],{"type":35,"tag":101,"props":8343,"children":8344},{},[8345],{"type":41,"value":8346},"Removed 5 unused indexes",{"type":35,"tag":101,"props":8348,"children":8349},{},[8350],{"type":41,"value":8351},"Write throughput +18%",{"type":35,"tag":74,"props":8353,"children":8354},{},[8355,8360],{"type":35,"tag":101,"props":8356,"children":8357},{},[8358],{"type":41,"value":8359},"Added Redis for product catalogue",{"type":35,"tag":101,"props":8361,"children":8362},{},[8363],{"type":41,"value":8364},"Cache hit rate 94%",{"type":35,"tag":74,"props":8366,"children":8367},{},[8368,8381],{"type":35,"tag":101,"props":8369,"children":8370},{},[8371,8373,8379],{"type":41,"value":8372},"Partitioned ",{"type":35,"tag":194,"props":8374,"children":8376},{"className":8375},[],[8377],{"type":41,"value":8378},"orders",{"type":41,"value":8380}," table by month",{"type":35,"tag":101,"props":8382,"children":8383},{},[8384],{"type":41,"value":8385},"Flash sale timeouts eliminated",{"type":35,"tag":44,"props":8387,"children":8388},{},[8389],{"type":41,"value":8390},"The business outcome: a 24% increase in conversion rate—driven entirely by improved responsiveness. No new hardware was purchased.",{"type":35,"tag":36,"props":8392,"children":8394},{"id":8393},"schema-design-getting-it-right-upstream",[8395],{"type":41,"value":8396},"Schema Design: Getting It Right Upstream",{"type":35,"tag":44,"props":8398,"children":8399},{},[8400],{"type":41,"value":8401},"Optimising a poorly designed schema is fighting uphill. Principles that pay off long-term:",{"type":35,"tag":2939,"props":8403,"children":8404},{},[8405,8415,8425,8449],{"type":35,"tag":183,"props":8406,"children":8407},{},[8408,8413],{"type":35,"tag":105,"props":8409,"children":8410},{},[8411],{"type":41,"value":8412},"Normalise transactional tables",{"type":41,"value":8414}," — eliminating update anomalies is worth the occasional join",{"type":35,"tag":183,"props":8416,"children":8417},{},[8418,8423],{"type":35,"tag":105,"props":8419,"children":8420},{},[8421],{"type":41,"value":8422},"Denormalise for reporting",{"type":41,"value":8424}," — create dedicated summary tables or materialised views rather than forcing complex joins into every report query",{"type":35,"tag":183,"props":8426,"children":8427},{},[8428,8433,8435,8440,8441,8447],{"type":35,"tag":105,"props":8429,"children":8430},{},[8431],{"type":41,"value":8432},"Partition large tables",{"type":41,"value":8434}," — partition ",{"type":35,"tag":194,"props":8436,"children":8438},{"className":8437},[],[8439],{"type":41,"value":8378},{"type":41,"value":5573},{"type":35,"tag":194,"props":8442,"children":8444},{"className":8443},[],[8445],{"type":41,"value":8446},"events",{"type":41,"value":8448}," tables by date range so old data never slows current queries",{"type":35,"tag":183,"props":8450,"children":8451},{},[8452,8457,8458,8464,8466,8472,8474,8480,8482,8488],{"type":35,"tag":105,"props":8453,"children":8454},{},[8455],{"type":41,"value":8456},"Use appropriate data types",{"type":41,"value":192},{"type":35,"tag":194,"props":8459,"children":8461},{"className":8460},[],[8462],{"type":41,"value":8463},"BIGINT",{"type":41,"value":8465}," for IDs that will exceed 2 billion, ",{"type":35,"tag":194,"props":8467,"children":8469},{"className":8468},[],[8470],{"type":41,"value":8471},"TIMESTAMPTZ",{"type":41,"value":8473}," for timestamps (always store UTC), ",{"type":35,"tag":194,"props":8475,"children":8477},{"className":8476},[],[8478],{"type":41,"value":8479},"NUMERIC(10,2)",{"type":41,"value":8481}," for money (never ",{"type":35,"tag":194,"props":8483,"children":8485},{"className":8484},[],[8486],{"type":41,"value":8487},"FLOAT",{"type":41,"value":7001},{"type":35,"tag":44,"props":8490,"children":8491},{},[8492],{"type":41,"value":8493},"Database performance is a product of schema design, query patterns, and infrastructure working together. Fix all three, and you'll handle 10× the traffic on the same hardware.",{"type":35,"tag":2978,"props":8495,"children":8496},{},[8497],{"type":41,"value":2982},{"title":7,"searchDepth":286,"depth":286,"links":8499},[8500,8501,8502,8507,8513,8517,8518],{"id":5793,"depth":276,"text":5796},{"id":5809,"depth":276,"text":5812},{"id":6085,"depth":276,"text":6088,"children":8503},[8504,8505,8506],{"id":6091,"depth":286,"text":6094},{"id":6473,"depth":286,"text":6476},{"id":6614,"depth":286,"text":6617},{"id":6912,"depth":276,"text":6915,"children":8508},[8509,8510,8511,8512],{"id":6923,"depth":286,"text":6926},{"id":7009,"depth":286,"text":7012},{"id":7217,"depth":286,"text":7220},{"id":7316,"depth":286,"text":7319},{"id":7459,"depth":276,"text":7462,"children":8514},[8515,8516],{"id":7470,"depth":286,"text":7473},{"id":7997,"depth":286,"text":8000},{"id":8282,"depth":276,"text":8285},{"id":8393,"depth":276,"text":8396},"content:blog:database-optimization.md","blog/database-optimization.md","blog/database-optimization",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"slug":10,"date":11,"readTime":12,"category":13,"image":14,"imageCaption":15,"author":8523,"tags":8525,"body":8526,"_type":2993,"_id":2994,"_source":2995,"_file":2996,"_stem":2997,"_extension":2998},{"name":17,"role":18,"avatar":19,"bio":20,"social":8524},{"github":22,"twitter":23,"linkedin":24},[26,27,28,29,30],{"type":32,"children":8527,"toc":11077},[8528,8532,8536,8540,8544,8548,8626,8630,8634,8638,8682,9042,9052,9056,9060,9069,9400,9404,9928,9942,9946,9950,10395,10399,10403,10407,10925,10929,10933,11030,11034,11038,11042,11069,11073],{"type":35,"tag":36,"props":8529,"children":8530},{"id":38},[8531],{"type":41,"value":42},{"type":35,"tag":44,"props":8533,"children":8534},{},[8535],{"type":41,"value":48},{"type":35,"tag":44,"props":8537,"children":8538},{},[8539],{"type":41,"value":53},{"type":35,"tag":36,"props":8541,"children":8542},{"id":56},[8543],{"type":41,"value":59},{"type":35,"tag":44,"props":8545,"children":8546},{},[8547],{"type":41,"value":64},{"type":35,"tag":66,"props":8549,"children":8550},{},[8551,8569],{"type":35,"tag":70,"props":8552,"children":8553},{},[8554],{"type":35,"tag":74,"props":8555,"children":8556},{},[8557,8561,8565],{"type":35,"tag":78,"props":8558,"children":8559},{},[8560],{"type":41,"value":82},{"type":35,"tag":78,"props":8562,"children":8563},{},[8564],{"type":41,"value":87},{"type":35,"tag":78,"props":8566,"children":8567},{},[8568],{"type":41,"value":92},{"type":35,"tag":94,"props":8570,"children":8571},{},[8572,8590,8608],{"type":35,"tag":74,"props":8573,"children":8574},{},[8575,8582,8586],{"type":35,"tag":101,"props":8576,"children":8577},{},[8578],{"type":35,"tag":105,"props":8579,"children":8580},{},[8581],{"type":41,"value":109},{"type":35,"tag":101,"props":8583,"children":8584},{},[8585],{"type":41,"value":114},{"type":35,"tag":101,"props":8587,"children":8588},{},[8589],{"type":41,"value":119},{"type":35,"tag":74,"props":8591,"children":8592},{},[8593,8600,8604],{"type":35,"tag":101,"props":8594,"children":8595},{},[8596],{"type":35,"tag":105,"props":8597,"children":8598},{},[8599],{"type":41,"value":130},{"type":35,"tag":101,"props":8601,"children":8602},{},[8603],{"type":41,"value":135},{"type":35,"tag":101,"props":8605,"children":8606},{},[8607],{"type":41,"value":140},{"type":35,"tag":74,"props":8609,"children":8610},{},[8611,8618,8622],{"type":35,"tag":101,"props":8612,"children":8613},{},[8614],{"type":35,"tag":105,"props":8615,"children":8616},{},[8617],{"type":41,"value":151},{"type":35,"tag":101,"props":8619,"children":8620},{},[8621],{"type":41,"value":156},{"type":35,"tag":101,"props":8623,"children":8624},{},[8625],{"type":41,"value":161},{"type":35,"tag":44,"props":8627,"children":8628},{},[8629],{"type":41,"value":166},{"type":35,"tag":36,"props":8631,"children":8632},{"id":169},[8633],{"type":41,"value":172},{"type":35,"tag":44,"props":8635,"children":8636},{},[8637],{"type":41,"value":177},{"type":35,"tag":179,"props":8639,"children":8640},{},[8641,8660,8668],{"type":35,"tag":183,"props":8642,"children":8643},{},[8644,8648,8649,8654,8655],{"type":35,"tag":105,"props":8645,"children":8646},{},[8647],{"type":41,"value":190},{"type":41,"value":192},{"type":35,"tag":194,"props":8650,"children":8652},{"className":8651},[],[8653],{"type":41,"value":199},{"type":41,"value":201},{"type":35,"tag":194,"props":8656,"children":8658},{"className":8657},[],[8659],{"type":41,"value":207},{"type":35,"tag":183,"props":8661,"children":8662},{},[8663,8667],{"type":35,"tag":105,"props":8664,"children":8665},{},[8666],{"type":41,"value":215},{"type":41,"value":217},{"type":35,"tag":183,"props":8669,"children":8670},{},[8671,8675,8676,8681],{"type":35,"tag":105,"props":8672,"children":8673},{},[8674],{"type":41,"value":225},{"type":41,"value":227},{"type":35,"tag":194,"props":8677,"children":8679},{"className":8678},[],[8680],{"type":41,"value":233},{"type":41,"value":235},{"type":35,"tag":237,"props":8683,"children":8684},{"className":239,"code":240,"language":241,"meta":7,"style":7},[8685],{"type":35,"tag":194,"props":8686,"children":8687},{"__ignoreMap":7},[8688,8707,8714,8769,8820,8859,8898,8949,8988,9035],{"type":35,"tag":247,"props":8689,"children":8690},{"class":249,"line":250},[8691,8695,8699,8703],{"type":35,"tag":247,"props":8692,"children":8693},{"style":254},[8694],{"type":41,"value":257},{"type":35,"tag":247,"props":8696,"children":8697},{"style":254},[8698],{"type":41,"value":262},{"type":35,"tag":247,"props":8700,"children":8701},{"style":254},[8702],{"type":41,"value":267},{"type":35,"tag":247,"props":8704,"children":8705},{"style":270},[8706],{"type":41,"value":273},{"type":35,"tag":247,"props":8708,"children":8709},{"class":249,"line":276},[8710],{"type":35,"tag":247,"props":8711,"children":8712},{"style":280},[8713],{"type":41,"value":283},{"type":35,"tag":247,"props":8715,"children":8716},{"class":249,"line":286},[8717,8721,8725,8729,8733,8737,8741,8745,8749,8753,8757,8761,8765],{"type":35,"tag":247,"props":8718,"children":8719},{"style":254},[8720],{"type":41,"value":292},{"type":35,"tag":247,"props":8722,"children":8723},{"style":254},[8724],{"type":41,"value":297},{"type":35,"tag":247,"props":8726,"children":8727},{"style":270},[8728],{"type":41,"value":302},{"type":35,"tag":247,"props":8730,"children":8731},{"style":270},[8732],{"type":41,"value":307},{"type":35,"tag":247,"props":8734,"children":8735},{"style":280},[8736],{"type":41,"value":312},{"type":35,"tag":247,"props":8738,"children":8739},{"style":254},[8740],{"type":41,"value":317},{"type":35,"tag":247,"props":8742,"children":8743},{"style":280},[8744],{"type":41,"value":322},{"type":35,"tag":247,"props":8746,"children":8747},{"style":254},[8748],{"type":41,"value":327},{"type":35,"tag":247,"props":8750,"children":8751},{"style":280},[8752],{"type":41,"value":332},{"type":35,"tag":247,"props":8754,"children":8755},{"style":254},[8756],{"type":41,"value":337},{"type":35,"tag":247,"props":8758,"children":8759},{"style":280},[8760],{"type":41,"value":342},{"type":35,"tag":247,"props":8762,"children":8763},{"style":270},[8764],{"type":41,"value":347},{"type":35,"tag":247,"props":8766,"children":8767},{"style":280},[8768],{"type":41,"value":352},{"type":35,"tag":247,"props":8770,"children":8771},{"class":249,"line":355},[8772,8776,8780,8784,8788,8792,8796,8800,8804,8808,8812,8816],{"type":35,"tag":247,"props":8773,"children":8774},{"style":254},[8775],{"type":41,"value":292},{"type":35,"tag":247,"props":8777,"children":8778},{"style":254},[8779],{"type":41,"value":297},{"type":35,"tag":247,"props":8781,"children":8782},{"style":254},[8783],{"type":41,"value":369},{"type":35,"tag":247,"props":8785,"children":8786},{"style":270},[8787],{"type":41,"value":374},{"type":35,"tag":247,"props":8789,"children":8790},{"style":280},[8791],{"type":41,"value":312},{"type":35,"tag":247,"props":8793,"children":8794},{"style":254},[8795],{"type":41,"value":317},{"type":35,"tag":247,"props":8797,"children":8798},{"style":280},[8799],{"type":41,"value":322},{"type":35,"tag":247,"props":8801,"children":8802},{"style":254},[8803],{"type":41,"value":327},{"type":35,"tag":247,"props":8805,"children":8806},{"style":280},[8807],{"type":41,"value":332},{"type":35,"tag":247,"props":8809,"children":8810},{"style":254},[8811],{"type":41,"value":337},{"type":35,"tag":247,"props":8813,"children":8814},{"style":401},[8815],{"type":41,"value":404},{"type":35,"tag":247,"props":8817,"children":8818},{"style":280},[8819],{"type":41,"value":409},{"type":35,"tag":247,"props":8821,"children":8822},{"class":249,"line":412},[8823,8827,8831,8835,8839,8843,8847,8851,8855],{"type":35,"tag":247,"props":8824,"children":8825},{"style":254},[8826],{"type":41,"value":292},{"type":35,"tag":247,"props":8828,"children":8829},{"style":254},[8830],{"type":41,"value":297},{"type":35,"tag":247,"props":8832,"children":8833},{"style":270},[8834],{"type":41,"value":302},{"type":35,"tag":247,"props":8836,"children":8837},{"style":270},[8838],{"type":41,"value":430},{"type":35,"tag":247,"props":8840,"children":8841},{"style":280},[8842],{"type":41,"value":312},{"type":35,"tag":247,"props":8844,"children":8845},{"style":254},[8846],{"type":41,"value":317},{"type":35,"tag":247,"props":8848,"children":8849},{"style":280},[8850],{"type":41,"value":322},{"type":35,"tag":247,"props":8852,"children":8853},{"style":254},[8854],{"type":41,"value":327},{"type":35,"tag":247,"props":8856,"children":8857},{"style":280},[8858],{"type":41,"value":451},{"type":35,"tag":247,"props":8860,"children":8861},{"class":249,"line":454},[8862,8866,8870,8874,8878,8882,8886,8890,8894],{"type":35,"tag":247,"props":8863,"children":8864},{"style":254},[8865],{"type":41,"value":292},{"type":35,"tag":247,"props":8867,"children":8868},{"style":254},[8869],{"type":41,"value":297},{"type":35,"tag":247,"props":8871,"children":8872},{"style":254},[8873],{"type":41,"value":468},{"type":35,"tag":247,"props":8875,"children":8876},{"style":270},[8877],{"type":41,"value":473},{"type":35,"tag":247,"props":8879,"children":8880},{"style":280},[8881],{"type":41,"value":312},{"type":35,"tag":247,"props":8883,"children":8884},{"style":254},[8885],{"type":41,"value":317},{"type":35,"tag":247,"props":8887,"children":8888},{"style":280},[8889],{"type":41,"value":322},{"type":35,"tag":247,"props":8891,"children":8892},{"style":254},[8893],{"type":41,"value":327},{"type":35,"tag":247,"props":8895,"children":8896},{"style":280},[8897],{"type":41,"value":451},{"type":35,"tag":247,"props":8899,"children":8900},{"class":249,"line":496},[8901,8905,8909,8913,8917,8921,8925,8929,8933,8937,8941,8945],{"type":35,"tag":247,"props":8902,"children":8903},{"style":254},[8904],{"type":41,"value":292},{"type":35,"tag":247,"props":8906,"children":8907},{"style":254},[8908],{"type":41,"value":297},{"type":35,"tag":247,"props":8910,"children":8911},{"style":270},[8912],{"type":41,"value":510},{"type":35,"tag":247,"props":8914,"children":8915},{"style":280},[8916],{"type":41,"value":515},{"type":35,"tag":247,"props":8918,"children":8919},{"style":270},[8920],{"type":41,"value":520},{"type":35,"tag":247,"props":8922,"children":8923},{"style":280},[8924],{"type":41,"value":525},{"type":35,"tag":247,"props":8926,"children":8927},{"style":270},[8928],{"type":41,"value":530},{"type":35,"tag":247,"props":8930,"children":8931},{"style":280},[8932],{"type":41,"value":312},{"type":35,"tag":247,"props":8934,"children":8935},{"style":254},[8936],{"type":41,"value":317},{"type":35,"tag":247,"props":8938,"children":8939},{"style":280},[8940],{"type":41,"value":322},{"type":35,"tag":247,"props":8942,"children":8943},{"style":254},[8944],{"type":41,"value":327},{"type":35,"tag":247,"props":8946,"children":8947},{"style":280},[8948],{"type":41,"value":451},{"type":35,"tag":247,"props":8950,"children":8951},{"class":249,"line":553},[8952,8956,8960,8964,8968,8972,8976,8980,8984],{"type":35,"tag":247,"props":8953,"children":8954},{"style":254},[8955],{"type":41,"value":292},{"type":35,"tag":247,"props":8957,"children":8958},{"style":254},[8959],{"type":41,"value":297},{"type":35,"tag":247,"props":8961,"children":8962},{"style":254},[8963],{"type":41,"value":567},{"type":35,"tag":247,"props":8965,"children":8966},{"style":270},[8967],{"type":41,"value":572},{"type":35,"tag":247,"props":8969,"children":8970},{"style":280},[8971],{"type":41,"value":312},{"type":35,"tag":247,"props":8973,"children":8974},{"style":254},[8975],{"type":41,"value":317},{"type":35,"tag":247,"props":8977,"children":8978},{"style":280},[8979],{"type":41,"value":322},{"type":35,"tag":247,"props":8981,"children":8982},{"style":254},[8983],{"type":41,"value":327},{"type":35,"tag":247,"props":8985,"children":8986},{"style":280},[8987],{"type":41,"value":451},{"type":35,"tag":247,"props":8989,"children":8990},{"class":249,"line":595},[8991,8995,8999,9003,9007,9011,9015,9019,9023,9027,9031],{"type":35,"tag":247,"props":8992,"children":8993},{"style":254},[8994],{"type":41,"value":292},{"type":35,"tag":247,"props":8996,"children":8997},{"style":254},[8998],{"type":41,"value":297},{"type":35,"tag":247,"props":9000,"children":9001},{"style":270},[9002],{"type":41,"value":609},{"type":35,"tag":247,"props":9004,"children":9005},{"style":270},[9006],{"type":41,"value":614},{"type":35,"tag":247,"props":9008,"children":9009},{"style":280},[9010],{"type":41,"value":312},{"type":35,"tag":247,"props":9012,"children":9013},{"style":254},[9014],{"type":41,"value":317},{"type":35,"tag":247,"props":9016,"children":9017},{"style":280},[9018],{"type":41,"value":322},{"type":35,"tag":247,"props":9020,"children":9021},{"style":254},[9022],{"type":41,"value":327},{"type":35,"tag":247,"props":9024,"children":9025},{"style":280},[9026],{"type":41,"value":332},{"type":35,"tag":247,"props":9028,"children":9029},{"style":254},[9030],{"type":41,"value":337},{"type":35,"tag":247,"props":9032,"children":9033},{"style":280},[9034],{"type":41,"value":643},{"type":35,"tag":247,"props":9036,"children":9037},{"class":249,"line":646},[9038],{"type":35,"tag":247,"props":9039,"children":9040},{"style":280},[9041],{"type":41,"value":652},{"type":35,"tag":44,"props":9043,"children":9044},{},[9045,9046,9051],{"type":41,"value":657},{"type":35,"tag":194,"props":9047,"children":9049},{"className":9048},[],[9050],{"type":41,"value":663},{"type":41,"value":665},{"type":35,"tag":36,"props":9053,"children":9054},{"id":668},[9055],{"type":41,"value":671},{"type":35,"tag":44,"props":9057,"children":9058},{},[9059],{"type":41,"value":676},{"type":35,"tag":44,"props":9061,"children":9062},{},[9063,9064,9068],{"type":41,"value":681},{"type":35,"tag":105,"props":9065,"children":9066},{},[9067],{"type":41,"value":686},{"type":41,"value":688},{"type":35,"tag":237,"props":9070,"children":9071},{"className":239,"code":691,"language":241,"meta":7,"style":7},[9072],{"type":35,"tag":194,"props":9073,"children":9074},{"__ignoreMap":7},[9075,9098,9105,9128,9135,9198,9217,9224,9231,9254,9261,9284,9319,9342,9357,9372,9379,9386,9393],{"type":35,"tag":247,"props":9076,"children":9077},{"class":249,"line":250},[9078,9082,9086,9090,9094],{"type":35,"tag":247,"props":9079,"children":9080},{"style":254},[9081],{"type":41,"value":257},{"type":35,"tag":247,"props":9083,"children":9084},{"style":254},[9085],{"type":41,"value":707},{"type":35,"tag":247,"props":9087,"children":9088},{"style":270},[9089],{"type":41,"value":712},{"type":35,"tag":247,"props":9091,"children":9092},{"style":280},[9093],{"type":41,"value":717},{"type":35,"tag":247,"props":9095,"children":9096},{"style":270},[9097],{"type":41,"value":722},{"type":35,"tag":247,"props":9099,"children":9100},{"class":249,"line":276},[9101],{"type":35,"tag":247,"props":9102,"children":9103},{"style":280},[9104],{"type":41,"value":283},{"type":35,"tag":247,"props":9106,"children":9107},{"class":249,"line":286},[9108,9112,9116,9120,9124],{"type":35,"tag":247,"props":9109,"children":9110},{"style":254},[9111],{"type":41,"value":737},{"type":35,"tag":247,"props":9113,"children":9114},{"style":254},[9115],{"type":41,"value":742},{"type":35,"tag":247,"props":9117,"children":9118},{"style":270},[9119],{"type":41,"value":747},{"type":35,"tag":247,"props":9121,"children":9122},{"style":270},[9123],{"type":41,"value":752},{"type":35,"tag":247,"props":9125,"children":9126},{"style":280},[9127],{"type":41,"value":409},{"type":35,"tag":247,"props":9129,"children":9130},{"class":249,"line":355},[9131],{"type":35,"tag":247,"props":9132,"children":9133},{"emptyLinePlaceholder":762},[9134],{"type":41,"value":765},{"type":35,"tag":247,"props":9136,"children":9137},{"class":249,"line":412},[9138,9142,9146,9150,9154,9158,9162,9166,9170,9174,9178,9182,9186,9190,9194],{"type":35,"tag":247,"props":9139,"children":9140},{"style":254},[9141],{"type":41,"value":292},{"type":35,"tag":247,"props":9143,"children":9144},{"style":254},[9145],{"type":41,"value":777},{"type":35,"tag":247,"props":9147,"children":9148},{"style":270},[9149],{"type":41,"value":782},{"type":35,"tag":247,"props":9151,"children":9152},{"style":270},[9153],{"type":41,"value":787},{"type":35,"tag":247,"props":9155,"children":9156},{"style":280},[9157],{"type":41,"value":515},{"type":35,"tag":247,"props":9159,"children":9160},{"style":270},[9161],{"type":41,"value":796},{"type":35,"tag":247,"props":9163,"children":9164},{"style":280},[9165],{"type":41,"value":801},{"type":35,"tag":247,"props":9167,"children":9168},{"style":270},[9169],{"type":41,"value":796},{"type":35,"tag":247,"props":9171,"children":9172},{"style":270},[9173],{"type":41,"value":810},{"type":35,"tag":247,"props":9175,"children":9176},{"style":280},[9177],{"type":41,"value":815},{"type":35,"tag":247,"props":9179,"children":9180},{"style":270},[9181],{"type":41,"value":820},{"type":35,"tag":247,"props":9183,"children":9184},{"style":270},[9185],{"type":41,"value":825},{"type":35,"tag":247,"props":9187,"children":9188},{"style":254},[9189],{"type":41,"value":830},{"type":35,"tag":247,"props":9191,"children":9192},{"style":254},[9193],{"type":41,"value":835},{"type":35,"tag":247,"props":9195,"children":9196},{"style":280},[9197],{"type":41,"value":840},{"type":35,"tag":247,"props":9199,"children":9200},{"class":249,"line":454},[9201,9205,9209,9213],{"type":35,"tag":247,"props":9202,"children":9203},{"style":254},[9204],{"type":41,"value":848},{"type":35,"tag":247,"props":9206,"children":9207},{"style":270},[9208],{"type":41,"value":853},{"type":35,"tag":247,"props":9210,"children":9211},{"style":280},[9212],{"type":41,"value":717},{"type":35,"tag":247,"props":9214,"children":9215},{"style":254},[9216],{"type":41,"value":862},{"type":35,"tag":247,"props":9218,"children":9219},{"class":249,"line":496},[9220],{"type":35,"tag":247,"props":9221,"children":9222},{"style":280},[9223],{"type":41,"value":870},{"type":35,"tag":247,"props":9225,"children":9226},{"class":249,"line":553},[9227],{"type":35,"tag":247,"props":9228,"children":9229},{"style":876},[9230],{"type":41,"value":879},{"type":35,"tag":247,"props":9232,"children":9233},{"class":249,"line":595},[9234,9238,9242,9246,9250],{"type":35,"tag":247,"props":9235,"children":9236},{"style":280},[9237],{"type":41,"value":887},{"type":35,"tag":247,"props":9239,"children":9240},{"style":270},[9241],{"type":41,"value":892},{"type":35,"tag":247,"props":9243,"children":9244},{"style":280},[9245],{"type":41,"value":897},{"type":35,"tag":247,"props":9247,"children":9248},{"style":254},[9249],{"type":41,"value":902},{"type":35,"tag":247,"props":9251,"children":9252},{"style":270},[9253],{"type":41,"value":907},{"type":35,"tag":247,"props":9255,"children":9256},{"class":249,"line":646},[9257],{"type":35,"tag":247,"props":9258,"children":9259},{"style":280},[9260],{"type":41,"value":915},{"type":35,"tag":247,"props":9262,"children":9263},{"class":249,"line":918},[9264,9268,9272,9276,9280],{"type":35,"tag":247,"props":9265,"children":9266},{"style":280},[9267],{"type":41,"value":924},{"type":35,"tag":247,"props":9269,"children":9270},{"style":254},[9271],{"type":41,"value":337},{"type":35,"tag":247,"props":9273,"children":9274},{"style":280},[9275],{"type":41,"value":342},{"type":35,"tag":247,"props":9277,"children":9278},{"style":270},[9279],{"type":41,"value":347},{"type":35,"tag":247,"props":9281,"children":9282},{"style":280},[9283],{"type":41,"value":941},{"type":35,"tag":247,"props":9285,"children":9286},{"class":249,"line":944},[9287,9291,9295,9299,9303,9307,9311,9315],{"type":35,"tag":247,"props":9288,"children":9289},{"style":280},[9290],{"type":41,"value":950},{"type":35,"tag":247,"props":9292,"children":9293},{"style":254},[9294],{"type":41,"value":337},{"type":35,"tag":247,"props":9296,"children":9297},{"style":254},[9298],{"type":41,"value":959},{"type":35,"tag":247,"props":9300,"children":9301},{"style":280},[9302],{"type":41,"value":897},{"type":35,"tag":247,"props":9304,"children":9305},{"style":270},[9306],{"type":41,"value":796},{"type":35,"tag":247,"props":9308,"children":9309},{"style":280},[9310],{"type":41,"value":972},{"type":35,"tag":247,"props":9312,"children":9313},{"style":254},[9314],{"type":41,"value":977},{"type":35,"tag":247,"props":9316,"children":9317},{"style":280},[9318],{"type":41,"value":982},{"type":35,"tag":247,"props":9320,"children":9321},{"class":249,"line":985},[9322,9326,9330,9334,9338],{"type":35,"tag":247,"props":9323,"children":9324},{"style":280},[9325],{"type":41,"value":991},{"type":35,"tag":247,"props":9327,"children":9328},{"style":254},[9329],{"type":41,"value":337},{"type":35,"tag":247,"props":9331,"children":9332},{"style":280},[9333],{"type":41,"value":1000},{"type":35,"tag":247,"props":9335,"children":9336},{"style":270},[9337],{"type":41,"value":1005},{"type":35,"tag":247,"props":9339,"children":9340},{"style":280},[9341],{"type":41,"value":1010},{"type":35,"tag":247,"props":9343,"children":9344},{"class":249,"line":1013},[9345,9349,9353],{"type":35,"tag":247,"props":9346,"children":9347},{"style":280},[9348],{"type":41,"value":1019},{"type":35,"tag":247,"props":9350,"children":9351},{"style":254},[9352],{"type":41,"value":337},{"type":35,"tag":247,"props":9354,"children":9355},{"style":280},[9356],{"type":41,"value":1028},{"type":35,"tag":247,"props":9358,"children":9359},{"class":249,"line":1031},[9360,9364,9368],{"type":35,"tag":247,"props":9361,"children":9362},{"style":280},[9363],{"type":41,"value":1037},{"type":35,"tag":247,"props":9365,"children":9366},{"style":254},[9367],{"type":41,"value":337},{"type":35,"tag":247,"props":9369,"children":9370},{"style":280},[9371],{"type":41,"value":1046},{"type":35,"tag":247,"props":9373,"children":9374},{"class":249,"line":1049},[9375],{"type":35,"tag":247,"props":9376,"children":9377},{"style":280},[9378],{"type":41,"value":1055},{"type":35,"tag":247,"props":9380,"children":9381},{"class":249,"line":1058},[9382],{"type":35,"tag":247,"props":9383,"children":9384},{"style":876},[9385],{"type":41,"value":1064},{"type":35,"tag":247,"props":9387,"children":9388},{"class":249,"line":1067},[9389],{"type":35,"tag":247,"props":9390,"children":9391},{"style":280},[9392],{"type":41,"value":1073},{"type":35,"tag":247,"props":9394,"children":9395},{"class":249,"line":1076},[9396],{"type":35,"tag":247,"props":9397,"children":9398},{"style":280},[9399],{"type":41,"value":652},{"type":35,"tag":44,"props":9401,"children":9402},{},[9403],{"type":41,"value":1086},{"type":35,"tag":237,"props":9405,"children":9406},{"className":239,"code":1089,"language":241,"meta":7,"style":7},[9407],{"type":35,"tag":194,"props":9408,"children":9409},{"__ignoreMap":7},[9410,9457,9464,9503,9510,9529,9536,9559,9594,9621,9644,9659,9666,9693,9700,9731,9738,9757,9772,9795,9802,9809,9824,9839,9846,9853,9872,9907,9914,9921],{"type":35,"tag":247,"props":9411,"children":9412},{"class":249,"line":250},[9413,9417,9421,9425,9429,9433,9437,9441,9445,9449,9453],{"type":35,"tag":247,"props":9414,"children":9415},{"style":254},[9416],{"type":41,"value":257},{"type":35,"tag":247,"props":9418,"children":9419},{"style":254},[9420],{"type":41,"value":707},{"type":35,"tag":247,"props":9422,"children":9423},{"style":270},[9424],{"type":41,"value":1109},{"type":35,"tag":247,"props":9426,"children":9427},{"style":280},[9428],{"type":41,"value":897},{"type":35,"tag":247,"props":9430,"children":9431},{"style":270},[9432],{"type":41,"value":1118},{"type":35,"tag":247,"props":9434,"children":9435},{"style":270},[9436],{"type":41,"value":1123},{"type":35,"tag":247,"props":9438,"children":9439},{"style":280},[9440],{"type":41,"value":815},{"type":35,"tag":247,"props":9442,"children":9443},{"style":270},[9444],{"type":41,"value":1132},{"type":35,"tag":247,"props":9446,"children":9447},{"style":270},[9448],{"type":41,"value":1137},{"type":35,"tag":247,"props":9450,"children":9451},{"style":280},[9452],{"type":41,"value":1142},{"type":35,"tag":247,"props":9454,"children":9455},{"style":270},[9456],{"type":41,"value":1147},{"type":35,"tag":247,"props":9458,"children":9459},{"class":249,"line":276},[9460],{"type":35,"tag":247,"props":9461,"children":9462},{"style":280},[9463],{"type":41,"value":283},{"type":35,"tag":247,"props":9465,"children":9466},{"class":249,"line":286},[9467,9471,9475,9479,9483,9487,9491,9495,9499],{"type":35,"tag":247,"props":9468,"children":9469},{"style":254},[9470],{"type":41,"value":1162},{"type":35,"tag":247,"props":9472,"children":9473},{"style":254},[9474],{"type":41,"value":1167},{"type":35,"tag":247,"props":9476,"children":9477},{"style":254},[9478],{"type":41,"value":777},{"type":35,"tag":247,"props":9480,"children":9481},{"style":270},[9482],{"type":41,"value":782},{"type":35,"tag":247,"props":9484,"children":9485},{"style":270},[9486],{"type":41,"value":1180},{"type":35,"tag":247,"props":9488,"children":9489},{"style":280},[9490],{"type":41,"value":897},{"type":35,"tag":247,"props":9492,"children":9493},{"style":270},[9494],{"type":41,"value":820},{"type":35,"tag":247,"props":9496,"children":9497},{"style":270},[9498],{"type":41,"value":825},{"type":35,"tag":247,"props":9500,"children":9501},{"style":280},[9502],{"type":41,"value":840},{"type":35,"tag":247,"props":9504,"children":9505},{"class":249,"line":355},[9506],{"type":35,"tag":247,"props":9507,"children":9508},{"style":280},[9509],{"type":41,"value":870},{"type":35,"tag":247,"props":9511,"children":9512},{"class":249,"line":412},[9513,9517,9521,9525],{"type":35,"tag":247,"props":9514,"children":9515},{"style":254},[9516],{"type":41,"value":1211},{"type":35,"tag":247,"props":9518,"children":9519},{"style":280},[9520],{"type":41,"value":1216},{"type":35,"tag":247,"props":9522,"children":9523},{"style":254},[9524],{"type":41,"value":977},{"type":35,"tag":247,"props":9526,"children":9527},{"style":280},[9528],{"type":41,"value":1225},{"type":35,"tag":247,"props":9530,"children":9531},{"class":249,"line":454},[9532],{"type":35,"tag":247,"props":9533,"children":9534},{"style":280},[9535],{"type":41,"value":915},{"type":35,"tag":247,"props":9537,"children":9538},{"class":249,"line":496},[9539,9543,9547,9551,9555],{"type":35,"tag":247,"props":9540,"children":9541},{"style":254},[9542],{"type":41,"value":1240},{"type":35,"tag":247,"props":9544,"children":9545},{"style":270},[9546],{"type":41,"value":1245},{"type":35,"tag":247,"props":9548,"children":9549},{"style":254},[9550],{"type":41,"value":830},{"type":35,"tag":247,"props":9552,"children":9553},{"style":254},[9554],{"type":41,"value":1254},{"type":35,"tag":247,"props":9556,"children":9557},{"style":280},[9558],{"type":41,"value":1259},{"type":35,"tag":247,"props":9560,"children":9561},{"class":249,"line":553},[9562,9566,9570,9574,9578,9582,9586,9590],{"type":35,"tag":247,"props":9563,"children":9564},{"style":280},[9565],{"type":41,"value":1267},{"type":35,"tag":247,"props":9567,"children":9568},{"style":270},[9569],{"type":41,"value":1272},{"type":35,"tag":247,"props":9571,"children":9572},{"style":280},[9573],{"type":41,"value":897},{"type":35,"tag":247,"props":9575,"children":9576},{"style":270},[9577],{"type":41,"value":1281},{"type":35,"tag":247,"props":9579,"children":9580},{"style":254},[9581],{"type":41,"value":1286},{"type":35,"tag":247,"props":9583,"children":9584},{"style":280},[9585],{"type":41,"value":1291},{"type":35,"tag":247,"props":9587,"children":9588},{"style":254},[9589],{"type":41,"value":1296},{"type":35,"tag":247,"props":9591,"children":9592},{"style":280},[9593],{"type":41,"value":1301},{"type":35,"tag":247,"props":9595,"children":9596},{"class":249,"line":595},[9597,9601,9605,9609,9613,9617],{"type":35,"tag":247,"props":9598,"children":9599},{"style":280},[9600],{"type":41,"value":1267},{"type":35,"tag":247,"props":9602,"children":9603},{"style":270},[9604],{"type":41,"value":1313},{"type":35,"tag":247,"props":9606,"children":9607},{"style":280},[9608],{"type":41,"value":897},{"type":35,"tag":247,"props":9610,"children":9611},{"style":270},[9612],{"type":41,"value":1281},{"type":35,"tag":247,"props":9614,"children":9615},{"style":254},[9616],{"type":41,"value":1286},{"type":35,"tag":247,"props":9618,"children":9619},{"style":280},[9620],{"type":41,"value":1330},{"type":35,"tag":247,"props":9622,"children":9623},{"class":249,"line":646},[9624,9628,9632,9636,9640],{"type":35,"tag":247,"props":9625,"children":9626},{"style":280},[9627],{"type":41,"value":1267},{"type":35,"tag":247,"props":9629,"children":9630},{"style":270},[9631],{"type":41,"value":1342},{"type":35,"tag":247,"props":9633,"children":9634},{"style":280},[9635],{"type":41,"value":897},{"type":35,"tag":247,"props":9637,"children":9638},{"style":401},[9639],{"type":41,"value":1351},{"type":35,"tag":247,"props":9641,"children":9642},{"style":280},[9643],{"type":41,"value":840},{"type":35,"tag":247,"props":9645,"children":9646},{"class":249,"line":918},[9647,9651,9655],{"type":35,"tag":247,"props":9648,"children":9649},{"style":280},[9650],{"type":41,"value":1267},{"type":35,"tag":247,"props":9652,"children":9653},{"style":270},[9654],{"type":41,"value":1367},{"type":35,"tag":247,"props":9656,"children":9657},{"style":280},[9658],{"type":41,"value":1372},{"type":35,"tag":247,"props":9660,"children":9661},{"class":249,"line":944},[9662],{"type":35,"tag":247,"props":9663,"children":9664},{"emptyLinePlaceholder":762},[9665],{"type":41,"value":765},{"type":35,"tag":247,"props":9667,"children":9668},{"class":249,"line":985},[9669,9673,9677,9681,9685,9689],{"type":35,"tag":247,"props":9670,"children":9671},{"style":254},[9672],{"type":41,"value":1387},{"type":35,"tag":247,"props":9674,"children":9675},{"style":280},[9676],{"type":41,"value":1216},{"type":35,"tag":247,"props":9678,"children":9679},{"style":254},[9680],{"type":41,"value":1396},{"type":35,"tag":247,"props":9682,"children":9683},{"style":270},[9684],{"type":41,"value":1401},{"type":35,"tag":247,"props":9686,"children":9687},{"style":254},[9688],{"type":41,"value":1406},{"type":35,"tag":247,"props":9690,"children":9691},{"style":280},[9692],{"type":41,"value":1411},{"type":35,"tag":247,"props":9694,"children":9695},{"class":249,"line":1013},[9696],{"type":35,"tag":247,"props":9697,"children":9698},{"style":280},[9699],{"type":41,"value":1419},{"type":35,"tag":247,"props":9701,"children":9702},{"class":249,"line":1031},[9703,9707,9711,9715,9719,9723,9727],{"type":35,"tag":247,"props":9704,"children":9705},{"style":254},[9706],{"type":41,"value":1427},{"type":35,"tag":247,"props":9708,"children":9709},{"style":280},[9710],{"type":41,"value":1432},{"type":35,"tag":247,"props":9712,"children":9713},{"style":270},[9714],{"type":41,"value":1437},{"type":35,"tag":247,"props":9716,"children":9717},{"style":280},[9718],{"type":41,"value":897},{"type":35,"tag":247,"props":9720,"children":9721},{"style":254},[9722],{"type":41,"value":902},{"type":35,"tag":247,"props":9724,"children":9725},{"style":270},[9726],{"type":41,"value":1450},{"type":35,"tag":247,"props":9728,"children":9729},{"style":280},[9730],{"type":41,"value":1455},{"type":35,"tag":247,"props":9732,"children":9733},{"class":249,"line":1049},[9734],{"type":35,"tag":247,"props":9735,"children":9736},{"style":280},[9737],{"type":41,"value":1463},{"type":35,"tag":247,"props":9739,"children":9740},{"class":249,"line":1058},[9741,9745,9749,9753],{"type":35,"tag":247,"props":9742,"children":9743},{"style":280},[9744],{"type":41,"value":1471},{"type":35,"tag":247,"props":9746,"children":9747},{"style":254},[9748],{"type":41,"value":337},{"type":35,"tag":247,"props":9750,"children":9751},{"style":1478},[9752],{"type":41,"value":1481},{"type":35,"tag":247,"props":9754,"children":9755},{"style":280},[9756],{"type":41,"value":982},{"type":35,"tag":247,"props":9758,"children":9759},{"class":249,"line":1067},[9760,9764,9768],{"type":35,"tag":247,"props":9761,"children":9762},{"style":280},[9763],{"type":41,"value":1493},{"type":35,"tag":247,"props":9765,"children":9766},{"style":254},[9767],{"type":41,"value":337},{"type":35,"tag":247,"props":9769,"children":9770},{"style":280},[9771],{"type":41,"value":1502},{"type":35,"tag":247,"props":9773,"children":9774},{"class":249,"line":1076},[9775,9779,9783,9787,9791],{"type":35,"tag":247,"props":9776,"children":9777},{"style":280},[9778],{"type":41,"value":1510},{"type":35,"tag":247,"props":9780,"children":9781},{"style":254},[9782],{"type":41,"value":337},{"type":35,"tag":247,"props":9784,"children":9785},{"style":280},[9786],{"type":41,"value":1519},{"type":35,"tag":247,"props":9788,"children":9789},{"style":270},[9790],{"type":41,"value":1524},{"type":35,"tag":247,"props":9792,"children":9793},{"style":280},[9794],{"type":41,"value":1529},{"type":35,"tag":247,"props":9796,"children":9797},{"class":249,"line":1532},[9798],{"type":35,"tag":247,"props":9799,"children":9800},{"style":280},[9801],{"type":41,"value":1538},{"type":35,"tag":247,"props":9803,"children":9804},{"class":249,"line":1541},[9805],{"type":35,"tag":247,"props":9806,"children":9807},{"emptyLinePlaceholder":762},[9808],{"type":41,"value":765},{"type":35,"tag":247,"props":9810,"children":9811},{"class":249,"line":1549},[9812,9816,9820],{"type":35,"tag":247,"props":9813,"children":9814},{"style":280},[9815],{"type":41,"value":1555},{"type":35,"tag":247,"props":9817,"children":9818},{"style":254},[9819],{"type":41,"value":337},{"type":35,"tag":247,"props":9821,"children":9822},{"style":280},[9823],{"type":41,"value":1564},{"type":35,"tag":247,"props":9825,"children":9826},{"class":249,"line":1567},[9827,9831,9835],{"type":35,"tag":247,"props":9828,"children":9829},{"style":280},[9830],{"type":41,"value":1573},{"type":35,"tag":247,"props":9832,"children":9833},{"style":254},[9834],{"type":41,"value":337},{"type":35,"tag":247,"props":9836,"children":9837},{"style":280},[9838],{"type":41,"value":643},{"type":35,"tag":247,"props":9840,"children":9841},{"class":249,"line":1584},[9842],{"type":35,"tag":247,"props":9843,"children":9844},{"style":280},[9845],{"type":41,"value":1590},{"type":35,"tag":247,"props":9847,"children":9848},{"class":249,"line":1593},[9849],{"type":35,"tag":247,"props":9850,"children":9851},{"emptyLinePlaceholder":762},[9852],{"type":41,"value":765},{"type":35,"tag":247,"props":9854,"children":9855},{"class":249,"line":1601},[9856,9860,9864,9868],{"type":35,"tag":247,"props":9857,"children":9858},{"style":254},[9859],{"type":41,"value":1607},{"type":35,"tag":247,"props":9861,"children":9862},{"style":280},[9863],{"type":41,"value":1612},{"type":35,"tag":247,"props":9865,"children":9866},{"style":270},[9867],{"type":41,"value":1617},{"type":35,"tag":247,"props":9869,"children":9870},{"style":280},[9871],{"type":41,"value":1372},{"type":35,"tag":247,"props":9873,"children":9874},{"class":249,"line":1624},[9875,9879,9883,9887,9891,9895,9899,9903],{"type":35,"tag":247,"props":9876,"children":9877},{"style":254},[9878],{"type":41,"value":1607},{"type":35,"tag":247,"props":9880,"children":9881},{"style":280},[9882],{"type":41,"value":1634},{"type":35,"tag":247,"props":9884,"children":9885},{"style":270},[9886],{"type":41,"value":1639},{"type":35,"tag":247,"props":9888,"children":9889},{"style":280},[9890],{"type":41,"value":1644},{"type":35,"tag":247,"props":9892,"children":9893},{"style":270},[9894],{"type":41,"value":1649},{"type":35,"tag":247,"props":9896,"children":9897},{"style":280},[9898],{"type":41,"value":897},{"type":35,"tag":247,"props":9900,"children":9901},{"style":401},[9902],{"type":41,"value":1658},{"type":35,"tag":247,"props":9904,"children":9905},{"style":280},[9906],{"type":41,"value":1663},{"type":35,"tag":247,"props":9908,"children":9909},{"class":249,"line":1666},[9910],{"type":35,"tag":247,"props":9911,"children":9912},{"style":280},[9913],{"type":41,"value":1672},{"type":35,"tag":247,"props":9915,"children":9916},{"class":249,"line":1675},[9917],{"type":35,"tag":247,"props":9918,"children":9919},{"style":280},[9920],{"type":41,"value":1073},{"type":35,"tag":247,"props":9922,"children":9923},{"class":249,"line":1683},[9924],{"type":35,"tag":247,"props":9925,"children":9926},{"style":280},[9927],{"type":41,"value":652},{"type":35,"tag":44,"props":9929,"children":9930},{},[9931,9932,9936,9937,9941],{"type":41,"value":1693},{"type":35,"tag":105,"props":9933,"children":9934},{},[9935],{"type":41,"value":1698},{"type":41,"value":1700},{"type":35,"tag":105,"props":9938,"children":9939},{},[9940],{"type":41,"value":1705},{"type":41,"value":1707},{"type":35,"tag":36,"props":9943,"children":9944},{"id":1710},[9945],{"type":41,"value":1713},{"type":35,"tag":44,"props":9947,"children":9948},{},[9949],{"type":41,"value":1718},{"type":35,"tag":237,"props":9951,"children":9952},{"className":239,"code":1721,"language":241,"meta":7,"style":7},[9953],{"type":35,"tag":194,"props":9954,"children":9955},{"__ignoreMap":7},[9956,9999,10006,10029,10052,10083,10102,10117,10132,10139,10182,10189,10196,10203,10222,10241,10248,10255,10274,10281,10304,10311,10318,10337,10356,10367,10374,10381,10388],{"type":35,"tag":247,"props":9957,"children":9958},{"class":249,"line":250},[9959,9963,9967,9971,9975,9979,9983,9987,9991,9995],{"type":35,"tag":247,"props":9960,"children":9961},{"style":254},[9962],{"type":41,"value":257},{"type":35,"tag":247,"props":9964,"children":9965},{"style":254},[9966],{"type":41,"value":707},{"type":35,"tag":247,"props":9968,"children":9969},{"style":270},[9970],{"type":41,"value":1741},{"type":35,"tag":247,"props":9972,"children":9973},{"style":280},[9974],{"type":41,"value":897},{"type":35,"tag":247,"props":9976,"children":9977},{"style":270},[9978],{"type":41,"value":1750},{"type":35,"tag":247,"props":9980,"children":9981},{"style":270},[9982],{"type":41,"value":1755},{"type":35,"tag":247,"props":9984,"children":9985},{"style":280},[9986],{"type":41,"value":815},{"type":35,"tag":247,"props":9988,"children":9989},{"style":270},[9990],{"type":41,"value":1764},{"type":35,"tag":247,"props":9992,"children":9993},{"style":270},[9994],{"type":41,"value":1769},{"type":35,"tag":247,"props":9996,"children":9997},{"style":280},[9998],{"type":41,"value":840},{"type":35,"tag":247,"props":10000,"children":10001},{"class":249,"line":276},[10002],{"type":35,"tag":247,"props":10003,"children":10004},{"style":280},[10005],{"type":41,"value":283},{"type":35,"tag":247,"props":10007,"children":10008},{"class":249,"line":286},[10009,10013,10017,10021,10025],{"type":35,"tag":247,"props":10010,"children":10011},{"style":280},[10012],{"type":41,"value":1788},{"type":35,"tag":247,"props":10014,"children":10015},{"style":270},[10016],{"type":41,"value":1793},{"type":35,"tag":247,"props":10018,"children":10019},{"style":280},[10020],{"type":41,"value":897},{"type":35,"tag":247,"props":10022,"children":10023},{"style":1478},[10024],{"type":41,"value":1802},{"type":35,"tag":247,"props":10026,"children":10027},{"style":280},[10028],{"type":41,"value":1807},{"type":35,"tag":247,"props":10030,"children":10031},{"class":249,"line":355},[10032,10036,10040,10044,10048],{"type":35,"tag":247,"props":10033,"children":10034},{"style":254},[10035],{"type":41,"value":292},{"type":35,"tag":247,"props":10037,"children":10038},{"style":254},[10039],{"type":41,"value":777},{"type":35,"tag":247,"props":10041,"children":10042},{"style":270},[10043],{"type":41,"value":782},{"type":35,"tag":247,"props":10045,"children":10046},{"style":270},[10047],{"type":41,"value":1827},{"type":35,"tag":247,"props":10049,"children":10050},{"style":280},[10051],{"type":41,"value":1832},{"type":35,"tag":247,"props":10053,"children":10054},{"class":249,"line":412},[10055,10059,10063,10067,10071,10075,10079],{"type":35,"tag":247,"props":10056,"children":10057},{"style":280},[10058],{"type":41,"value":1840},{"type":35,"tag":247,"props":10060,"children":10061},{"style":270},[10062],{"type":41,"value":1845},{"type":35,"tag":247,"props":10064,"children":10065},{"style":280},[10066],{"type":41,"value":897},{"type":35,"tag":247,"props":10068,"children":10069},{"style":1478},[10070],{"type":41,"value":1854},{"type":35,"tag":247,"props":10072,"children":10073},{"style":280},[10074],{"type":41,"value":815},{"type":35,"tag":247,"props":10076,"children":10077},{"style":1478},[10078],{"type":41,"value":1863},{"type":35,"tag":247,"props":10080,"children":10081},{"style":280},[10082],{"type":41,"value":982},{"type":35,"tag":247,"props":10084,"children":10085},{"class":249,"line":454},[10086,10090,10094,10098],{"type":35,"tag":247,"props":10087,"children":10088},{"style":270},[10089],{"type":41,"value":1875},{"type":35,"tag":247,"props":10091,"children":10092},{"style":254},[10093],{"type":41,"value":830},{"type":35,"tag":247,"props":10095,"children":10096},{"style":1478},[10097],{"type":41,"value":1884},{"type":35,"tag":247,"props":10099,"children":10100},{"style":280},[10101],{"type":41,"value":1807},{"type":35,"tag":247,"props":10103,"children":10104},{"class":249,"line":496},[10105,10109,10113],{"type":35,"tag":247,"props":10106,"children":10107},{"style":270},[10108],{"type":41,"value":1896},{"type":35,"tag":247,"props":10110,"children":10111},{"style":270},[10112],{"type":41,"value":1901},{"type":35,"tag":247,"props":10114,"children":10115},{"style":280},[10116],{"type":41,"value":982},{"type":35,"tag":247,"props":10118,"children":10119},{"class":249,"line":553},[10120,10124,10128],{"type":35,"tag":247,"props":10121,"children":10122},{"style":270},[10123],{"type":41,"value":1913},{"type":35,"tag":247,"props":10125,"children":10126},{"style":270},[10127],{"type":41,"value":1918},{"type":35,"tag":247,"props":10129,"children":10130},{"style":280},[10131],{"type":41,"value":840},{"type":35,"tag":247,"props":10133,"children":10134},{"class":249,"line":595},[10135],{"type":35,"tag":247,"props":10136,"children":10137},{"style":280},[10138],{"type":41,"value":870},{"type":35,"tag":247,"props":10140,"children":10141},{"class":249,"line":646},[10142,10146,10150,10154,10158,10162,10166,10170,10174,10178],{"type":35,"tag":247,"props":10143,"children":10144},{"style":254},[10145],{"type":41,"value":1937},{"type":35,"tag":247,"props":10147,"children":10148},{"style":270},[10149],{"type":41,"value":810},{"type":35,"tag":247,"props":10151,"children":10152},{"style":254},[10153],{"type":41,"value":830},{"type":35,"tag":247,"props":10155,"children":10156},{"style":280},[10157],{"type":41,"value":1000},{"type":35,"tag":247,"props":10159,"children":10160},{"style":270},[10161],{"type":41,"value":1954},{"type":35,"tag":247,"props":10163,"children":10164},{"style":280},[10165],{"type":41,"value":515},{"type":35,"tag":247,"props":10167,"children":10168},{"style":270},[10169],{"type":41,"value":1963},{"type":35,"tag":247,"props":10171,"children":10172},{"style":280},[10173],{"type":41,"value":1968},{"type":35,"tag":247,"props":10175,"children":10176},{"style":254},[10177],{"type":41,"value":977},{"type":35,"tag":247,"props":10179,"children":10180},{"style":280},[10181],{"type":41,"value":409},{"type":35,"tag":247,"props":10183,"children":10184},{"class":249,"line":918},[10185],{"type":35,"tag":247,"props":10186,"children":10187},{"emptyLinePlaceholder":762},[10188],{"type":41,"value":765},{"type":35,"tag":247,"props":10190,"children":10191},{"class":249,"line":944},[10192],{"type":35,"tag":247,"props":10193,"children":10194},{"style":254},[10195],{"type":41,"value":1991},{"type":35,"tag":247,"props":10197,"children":10198},{"class":249,"line":985},[10199],{"type":35,"tag":247,"props":10200,"children":10201},{"style":280},[10202],{"type":41,"value":915},{"type":35,"tag":247,"props":10204,"children":10205},{"class":249,"line":1013},[10206,10210,10214,10218],{"type":35,"tag":247,"props":10207,"children":10208},{"style":254},[10209],{"type":41,"value":1607},{"type":35,"tag":247,"props":10211,"children":10212},{"style":280},[10213],{"type":41,"value":2010},{"type":35,"tag":247,"props":10215,"children":10216},{"style":270},[10217],{"type":41,"value":2015},{"type":35,"tag":247,"props":10219,"children":10220},{"style":280},[10221],{"type":41,"value":2020},{"type":35,"tag":247,"props":10223,"children":10224},{"class":249,"line":1031},[10225,10229,10233,10237],{"type":35,"tag":247,"props":10226,"children":10227},{"style":254},[10228],{"type":41,"value":1607},{"type":35,"tag":247,"props":10230,"children":10231},{"style":280},[10232],{"type":41,"value":2032},{"type":35,"tag":247,"props":10234,"children":10235},{"style":270},[10236],{"type":41,"value":2037},{"type":35,"tag":247,"props":10238,"children":10239},{"style":280},[10240],{"type":41,"value":2042},{"type":35,"tag":247,"props":10242,"children":10243},{"class":249,"line":1049},[10244],{"type":35,"tag":247,"props":10245,"children":10246},{"emptyLinePlaceholder":762},[10247],{"type":41,"value":765},{"type":35,"tag":247,"props":10249,"children":10250},{"class":249,"line":1058},[10251],{"type":35,"tag":247,"props":10252,"children":10253},{"style":876},[10254],{"type":41,"value":2057},{"type":35,"tag":247,"props":10256,"children":10257},{"class":249,"line":1067},[10258,10262,10266,10270],{"type":35,"tag":247,"props":10259,"children":10260},{"style":254},[10261],{"type":41,"value":1607},{"type":35,"tag":247,"props":10263,"children":10264},{"style":280},[10265],{"type":41,"value":2069},{"type":35,"tag":247,"props":10267,"children":10268},{"style":270},[10269],{"type":41,"value":2074},{"type":35,"tag":247,"props":10271,"children":10272},{"style":280},[10273],{"type":41,"value":2079},{"type":35,"tag":247,"props":10275,"children":10276},{"class":249,"line":1076},[10277],{"type":35,"tag":247,"props":10278,"children":10279},{"style":280},[10280],{"type":41,"value":1672},{"type":35,"tag":247,"props":10282,"children":10283},{"class":249,"line":1532},[10284,10288,10292,10296,10300],{"type":35,"tag":247,"props":10285,"children":10286},{"style":254},[10287],{"type":41,"value":2094},{"type":35,"tag":247,"props":10289,"children":10290},{"style":280},[10291],{"type":41,"value":1216},{"type":35,"tag":247,"props":10293,"children":10294},{"style":270},[10295],{"type":41,"value":2103},{"type":35,"tag":247,"props":10297,"children":10298},{"style":270},[10299],{"type":41,"value":2108},{"type":35,"tag":247,"props":10301,"children":10302},{"style":280},[10303],{"type":41,"value":840},{"type":35,"tag":247,"props":10305,"children":10306},{"class":249,"line":1541},[10307],{"type":35,"tag":247,"props":10308,"children":10309},{"style":280},[10310],{"type":41,"value":915},{"type":35,"tag":247,"props":10312,"children":10313},{"class":249,"line":1549},[10314],{"type":35,"tag":247,"props":10315,"children":10316},{"style":876},[10317],{"type":41,"value":2127},{"type":35,"tag":247,"props":10319,"children":10320},{"class":249,"line":1567},[10321,10325,10329,10333],{"type":35,"tag":247,"props":10322,"children":10323},{"style":254},[10324],{"type":41,"value":1607},{"type":35,"tag":247,"props":10326,"children":10327},{"style":280},[10328],{"type":41,"value":2069},{"type":35,"tag":247,"props":10330,"children":10331},{"style":270},[10332],{"type":41,"value":2143},{"type":35,"tag":247,"props":10334,"children":10335},{"style":280},[10336],{"type":41,"value":2148},{"type":35,"tag":247,"props":10338,"children":10339},{"class":249,"line":1584},[10340,10344,10348,10352],{"type":35,"tag":247,"props":10341,"children":10342},{"style":270},[10343],{"type":41,"value":2156},{"type":35,"tag":247,"props":10345,"children":10346},{"style":280},[10347],{"type":41,"value":2161},{"type":35,"tag":247,"props":10349,"children":10350},{"style":1478},[10351],{"type":41,"value":2166},{"type":35,"tag":247,"props":10353,"children":10354},{"style":280},[10355],{"type":41,"value":982},{"type":35,"tag":247,"props":10357,"children":10358},{"class":249,"line":1593},[10359,10363],{"type":35,"tag":247,"props":10360,"children":10361},{"style":270},[10362],{"type":41,"value":2178},{"type":35,"tag":247,"props":10364,"children":10365},{"style":280},[10366],{"type":41,"value":2183},{"type":35,"tag":247,"props":10368,"children":10369},{"class":249,"line":1601},[10370],{"type":35,"tag":247,"props":10371,"children":10372},{"style":280},[10373],{"type":41,"value":1672},{"type":35,"tag":247,"props":10375,"children":10376},{"class":249,"line":1624},[10377],{"type":35,"tag":247,"props":10378,"children":10379},{"style":876},[10380],{"type":41,"value":2198},{"type":35,"tag":247,"props":10382,"children":10383},{"class":249,"line":1666},[10384],{"type":35,"tag":247,"props":10385,"children":10386},{"style":280},[10387],{"type":41,"value":1073},{"type":35,"tag":247,"props":10389,"children":10390},{"class":249,"line":1675},[10391],{"type":35,"tag":247,"props":10392,"children":10393},{"style":280},[10394],{"type":41,"value":652},{"type":35,"tag":44,"props":10396,"children":10397},{},[10398],{"type":41,"value":2217},{"type":35,"tag":36,"props":10400,"children":10401},{"id":2220},[10402],{"type":41,"value":2223},{"type":35,"tag":44,"props":10404,"children":10405},{},[10406],{"type":41,"value":2228},{"type":35,"tag":237,"props":10408,"children":10409},{"className":239,"code":2231,"language":241,"meta":7,"style":7},[10410],{"type":35,"tag":194,"props":10411,"children":10412},{"__ignoreMap":7},[10413,10420,10443,10458,10465,10476,10483,10502,10509,10524,10543,10574,10605,10612,10619,10626,10633,10664,10695,10702,10725,10732,10747,10762,10769,10792,10799,10818,10849,10880,10887,10918],{"type":35,"tag":247,"props":10414,"children":10415},{"class":249,"line":250},[10416],{"type":35,"tag":247,"props":10417,"children":10418},{"style":876},[10419],{"type":41,"value":2243},{"type":35,"tag":247,"props":10421,"children":10422},{"class":249,"line":276},[10423,10427,10431,10435,10439],{"type":35,"tag":247,"props":10424,"children":10425},{"style":280},[10426],{"type":41,"value":2251},{"type":35,"tag":247,"props":10428,"children":10429},{"style":270},[10430],{"type":41,"value":2256},{"type":35,"tag":247,"props":10432,"children":10433},{"style":280},[10434],{"type":41,"value":897},{"type":35,"tag":247,"props":10436,"children":10437},{"style":270},[10438],{"type":41,"value":2265},{"type":35,"tag":247,"props":10440,"children":10441},{"style":254},[10442],{"type":41,"value":2270},{"type":35,"tag":247,"props":10444,"children":10445},{"class":249,"line":286},[10446,10450,10454],{"type":35,"tag":247,"props":10447,"children":10448},{"style":254},[10449],{"type":41,"value":2278},{"type":35,"tag":247,"props":10451,"children":10452},{"style":270},[10453],{"type":41,"value":2283},{"type":35,"tag":247,"props":10455,"children":10456},{"style":280},[10457],{"type":41,"value":1832},{"type":35,"tag":247,"props":10459,"children":10460},{"class":249,"line":355},[10461],{"type":35,"tag":247,"props":10462,"children":10463},{"style":280},[10464],{"type":41,"value":2295},{"type":35,"tag":247,"props":10466,"children":10467},{"class":249,"line":412},[10468,10472],{"type":35,"tag":247,"props":10469,"children":10470},{"style":254},[10471],{"type":41,"value":2303},{"type":35,"tag":247,"props":10473,"children":10474},{"style":270},[10475],{"type":41,"value":2308},{"type":35,"tag":247,"props":10477,"children":10478},{"class":249,"line":454},[10479],{"type":35,"tag":247,"props":10480,"children":10481},{"style":280},[10482],{"type":41,"value":915},{"type":35,"tag":247,"props":10484,"children":10485},{"class":249,"line":496},[10486,10490,10494,10498],{"type":35,"tag":247,"props":10487,"children":10488},{"style":280},[10489],{"type":41,"value":2323},{"type":35,"tag":247,"props":10491,"children":10492},{"style":254},[10493],{"type":41,"value":337},{"type":35,"tag":247,"props":10495,"children":10496},{"style":254},[10497],{"type":41,"value":2332},{"type":35,"tag":247,"props":10499,"children":10500},{"style":270},[10501],{"type":41,"value":2337},{"type":35,"tag":247,"props":10503,"children":10504},{"class":249,"line":553},[10505],{"type":35,"tag":247,"props":10506,"children":10507},{"style":280},[10508],{"type":41,"value":1419},{"type":35,"tag":247,"props":10510,"children":10511},{"class":249,"line":595},[10512,10516,10520],{"type":35,"tag":247,"props":10513,"children":10514},{"style":280},[10515],{"type":41,"value":2352},{"type":35,"tag":247,"props":10517,"children":10518},{"style":254},[10519],{"type":41,"value":337},{"type":35,"tag":247,"props":10521,"children":10522},{"style":280},[10523],{"type":41,"value":2361},{"type":35,"tag":247,"props":10525,"children":10526},{"class":249,"line":646},[10527,10531,10535,10539],{"type":35,"tag":247,"props":10528,"children":10529},{"style":280},[10530],{"type":41,"value":2369},{"type":35,"tag":247,"props":10532,"children":10533},{"style":254},[10534],{"type":41,"value":337},{"type":35,"tag":247,"props":10536,"children":10537},{"style":401},[10538],{"type":41,"value":2378},{"type":35,"tag":247,"props":10540,"children":10541},{"style":280},[10542],{"type":41,"value":982},{"type":35,"tag":247,"props":10544,"children":10545},{"class":249,"line":918},[10546,10550,10554,10558,10562,10566,10570],{"type":35,"tag":247,"props":10547,"children":10548},{"style":280},[10549],{"type":41,"value":2390},{"type":35,"tag":247,"props":10551,"children":10552},{"style":254},[10553],{"type":41,"value":337},{"type":35,"tag":247,"props":10555,"children":10556},{"style":280},[10557],{"type":41,"value":2399},{"type":35,"tag":247,"props":10559,"children":10560},{"style":270},[10561],{"type":41,"value":1649},{"type":35,"tag":247,"props":10563,"children":10564},{"style":280},[10565],{"type":41,"value":897},{"type":35,"tag":247,"props":10567,"children":10568},{"style":401},[10569],{"type":41,"value":2412},{"type":35,"tag":247,"props":10571,"children":10572},{"style":280},[10573],{"type":41,"value":2417},{"type":35,"tag":247,"props":10575,"children":10576},{"class":249,"line":944},[10577,10581,10585,10589,10593,10597,10601],{"type":35,"tag":247,"props":10578,"children":10579},{"style":280},[10580],{"type":41,"value":2425},{"type":35,"tag":247,"props":10582,"children":10583},{"style":254},[10584],{"type":41,"value":337},{"type":35,"tag":247,"props":10586,"children":10587},{"style":280},[10588],{"type":41,"value":2399},{"type":35,"tag":247,"props":10590,"children":10591},{"style":270},[10592],{"type":41,"value":1649},{"type":35,"tag":247,"props":10594,"children":10595},{"style":280},[10596],{"type":41,"value":897},{"type":35,"tag":247,"props":10598,"children":10599},{"style":401},[10600],{"type":41,"value":2446},{"type":35,"tag":247,"props":10602,"children":10603},{"style":280},[10604],{"type":41,"value":840},{"type":35,"tag":247,"props":10606,"children":10607},{"class":249,"line":985},[10608],{"type":35,"tag":247,"props":10609,"children":10610},{"style":280},[10611],{"type":41,"value":1590},{"type":35,"tag":247,"props":10613,"children":10614},{"class":249,"line":1013},[10615],{"type":35,"tag":247,"props":10616,"children":10617},{"style":280},[10618],{"type":41,"value":2465},{"type":35,"tag":247,"props":10620,"children":10621},{"class":249,"line":1031},[10622],{"type":35,"tag":247,"props":10623,"children":10624},{"emptyLinePlaceholder":762},[10625],{"type":41,"value":765},{"type":35,"tag":247,"props":10627,"children":10628},{"class":249,"line":1049},[10629],{"type":35,"tag":247,"props":10630,"children":10631},{"style":876},[10632],{"type":41,"value":2480},{"type":35,"tag":247,"props":10634,"children":10635},{"class":249,"line":1058},[10636,10640,10644,10648,10652,10656,10660],{"type":35,"tag":247,"props":10637,"children":10638},{"style":280},[10639],{"type":41,"value":2251},{"type":35,"tag":247,"props":10641,"children":10642},{"style":270},[10643],{"type":41,"value":2492},{"type":35,"tag":247,"props":10645,"children":10646},{"style":280},[10647],{"type":41,"value":515},{"type":35,"tag":247,"props":10649,"children":10650},{"style":270},[10651],{"type":41,"value":2501},{"type":35,"tag":247,"props":10653,"children":10654},{"style":280},[10655],{"type":41,"value":815},{"type":35,"tag":247,"props":10657,"children":10658},{"style":270},[10659],{"type":41,"value":2510},{"type":35,"tag":247,"props":10661,"children":10662},{"style":280},[10663],{"type":41,"value":2515},{"type":35,"tag":247,"props":10665,"children":10666},{"class":249,"line":1067},[10667,10671,10675,10679,10683,10687,10691],{"type":35,"tag":247,"props":10668,"children":10669},{"style":280},[10670],{"type":41,"value":2523},{"type":35,"tag":247,"props":10672,"children":10673},{"style":270},[10674],{"type":41,"value":2528},{"type":35,"tag":247,"props":10676,"children":10677},{"style":280},[10678],{"type":41,"value":897},{"type":35,"tag":247,"props":10680,"children":10681},{"style":1478},[10682],{"type":41,"value":2537},{"type":35,"tag":247,"props":10684,"children":10685},{"style":280},[10686],{"type":41,"value":815},{"type":35,"tag":247,"props":10688,"children":10689},{"style":270},[10690],{"type":41,"value":2546},{"type":35,"tag":247,"props":10692,"children":10693},{"style":254},[10694],{"type":41,"value":2270},{"type":35,"tag":247,"props":10696,"children":10697},{"class":249,"line":1076},[10698],{"type":35,"tag":247,"props":10699,"children":10700},{"style":280},[10701],{"type":41,"value":870},{"type":35,"tag":247,"props":10703,"children":10704},{"class":249,"line":1532},[10705,10709,10713,10717,10721],{"type":35,"tag":247,"props":10706,"children":10707},{"style":280},[10708],{"type":41,"value":2565},{"type":35,"tag":247,"props":10710,"children":10711},{"style":270},[10712],{"type":41,"value":2570},{"type":35,"tag":247,"props":10714,"children":10715},{"style":280},[10716],{"type":41,"value":897},{"type":35,"tag":247,"props":10718,"children":10719},{"style":254},[10720],{"type":41,"value":902},{"type":35,"tag":247,"props":10722,"children":10723},{"style":270},[10724],{"type":41,"value":2583},{"type":35,"tag":247,"props":10726,"children":10727},{"class":249,"line":1541},[10728],{"type":35,"tag":247,"props":10729,"children":10730},{"style":280},[10731],{"type":41,"value":915},{"type":35,"tag":247,"props":10733,"children":10734},{"class":249,"line":1549},[10735,10739,10743],{"type":35,"tag":247,"props":10736,"children":10737},{"style":280},[10738],{"type":41,"value":2598},{"type":35,"tag":247,"props":10740,"children":10741},{"style":254},[10742],{"type":41,"value":337},{"type":35,"tag":247,"props":10744,"children":10745},{"style":280},[10746],{"type":41,"value":2607},{"type":35,"tag":247,"props":10748,"children":10749},{"class":249,"line":1567},[10750,10754,10758],{"type":35,"tag":247,"props":10751,"children":10752},{"style":280},[10753],{"type":41,"value":2615},{"type":35,"tag":247,"props":10755,"children":10756},{"style":254},[10757],{"type":41,"value":337},{"type":35,"tag":247,"props":10759,"children":10760},{"style":401},[10761],{"type":41,"value":2624},{"type":35,"tag":247,"props":10763,"children":10764},{"class":249,"line":1584},[10765],{"type":35,"tag":247,"props":10766,"children":10767},{"style":280},[10768],{"type":41,"value":1055},{"type":35,"tag":247,"props":10770,"children":10771},{"class":249,"line":1593},[10772,10776,10780,10784,10788],{"type":35,"tag":247,"props":10773,"children":10774},{"style":280},[10775],{"type":41,"value":2565},{"type":35,"tag":247,"props":10777,"children":10778},{"style":270},[10779],{"type":41,"value":2643},{"type":35,"tag":247,"props":10781,"children":10782},{"style":280},[10783],{"type":41,"value":897},{"type":35,"tag":247,"props":10785,"children":10786},{"style":254},[10787],{"type":41,"value":902},{"type":35,"tag":247,"props":10789,"children":10790},{"style":270},[10791],{"type":41,"value":2656},{"type":35,"tag":247,"props":10793,"children":10794},{"class":249,"line":1601},[10795],{"type":35,"tag":247,"props":10796,"children":10797},{"style":280},[10798],{"type":41,"value":915},{"type":35,"tag":247,"props":10800,"children":10801},{"class":249,"line":1624},[10802,10806,10810,10814],{"type":35,"tag":247,"props":10803,"children":10804},{"style":280},[10805],{"type":41,"value":2671},{"type":35,"tag":247,"props":10807,"children":10808},{"style":254},[10809],{"type":41,"value":337},{"type":35,"tag":247,"props":10811,"children":10812},{"style":401},[10813],{"type":41,"value":2680},{"type":35,"tag":247,"props":10815,"children":10816},{"style":280},[10817],{"type":41,"value":982},{"type":35,"tag":247,"props":10819,"children":10820},{"class":249,"line":1666},[10821,10825,10829,10833,10837,10841,10845],{"type":35,"tag":247,"props":10822,"children":10823},{"style":280},[10824],{"type":41,"value":2692},{"type":35,"tag":247,"props":10826,"children":10827},{"style":254},[10828],{"type":41,"value":337},{"type":35,"tag":247,"props":10830,"children":10831},{"style":280},[10832],{"type":41,"value":2399},{"type":35,"tag":247,"props":10834,"children":10835},{"style":270},[10836],{"type":41,"value":1649},{"type":35,"tag":247,"props":10838,"children":10839},{"style":280},[10840],{"type":41,"value":897},{"type":35,"tag":247,"props":10842,"children":10843},{"style":401},[10844],{"type":41,"value":2713},{"type":35,"tag":247,"props":10846,"children":10847},{"style":280},[10848],{"type":41,"value":2417},{"type":35,"tag":247,"props":10850,"children":10851},{"class":249,"line":1675},[10852,10856,10860,10864,10868,10872,10876],{"type":35,"tag":247,"props":10853,"children":10854},{"style":280},[10855],{"type":41,"value":2725},{"type":35,"tag":247,"props":10857,"children":10858},{"style":254},[10859],{"type":41,"value":337},{"type":35,"tag":247,"props":10861,"children":10862},{"style":280},[10863],{"type":41,"value":2399},{"type":35,"tag":247,"props":10865,"children":10866},{"style":270},[10867],{"type":41,"value":1649},{"type":35,"tag":247,"props":10869,"children":10870},{"style":280},[10871],{"type":41,"value":897},{"type":35,"tag":247,"props":10873,"children":10874},{"style":401},[10875],{"type":41,"value":2746},{"type":35,"tag":247,"props":10877,"children":10878},{"style":280},[10879],{"type":41,"value":840},{"type":35,"tag":247,"props":10881,"children":10882},{"class":249,"line":1683},[10883],{"type":35,"tag":247,"props":10884,"children":10885},{"style":280},[10886],{"type":41,"value":1055},{"type":35,"tag":247,"props":10888,"children":10889},{"class":249,"line":2760},[10890,10894,10898,10902,10906,10910,10914],{"type":35,"tag":247,"props":10891,"children":10892},{"style":280},[10893],{"type":41,"value":2565},{"type":35,"tag":247,"props":10895,"children":10896},{"style":270},[10897],{"type":41,"value":2770},{"type":35,"tag":247,"props":10899,"children":10900},{"style":280},[10901],{"type":41,"value":1644},{"type":35,"tag":247,"props":10903,"children":10904},{"style":270},[10905],{"type":41,"value":1649},{"type":35,"tag":247,"props":10907,"children":10908},{"style":280},[10909],{"type":41,"value":897},{"type":35,"tag":247,"props":10911,"children":10912},{"style":401},[10913],{"type":41,"value":2787},{"type":35,"tag":247,"props":10915,"children":10916},{"style":280},[10917],{"type":41,"value":2792},{"type":35,"tag":247,"props":10919,"children":10920},{"class":249,"line":2795},[10921],{"type":35,"tag":247,"props":10922,"children":10923},{"style":280},[10924],{"type":41,"value":2801},{"type":35,"tag":36,"props":10926,"children":10927},{"id":2804},[10928],{"type":41,"value":2807},{"type":35,"tag":44,"props":10930,"children":10931},{},[10932],{"type":41,"value":2812},{"type":35,"tag":237,"props":10934,"children":10935},{"className":239,"code":2815,"language":241,"meta":7,"style":7},[10936],{"type":35,"tag":194,"props":10937,"children":10938},{"__ignoreMap":7},[10939,10954,10981,10996,11011],{"type":35,"tag":247,"props":10940,"children":10941},{"class":249,"line":250},[10942,10946,10950],{"type":35,"tag":247,"props":10943,"children":10944},{"style":280},[10945],{"type":41,"value":2827},{"type":35,"tag":247,"props":10947,"children":10948},{"style":270},[10949],{"type":41,"value":2832},{"type":35,"tag":247,"props":10951,"children":10952},{"style":280},[10953],{"type":41,"value":1529},{"type":35,"tag":247,"props":10955,"children":10956},{"class":249,"line":276},[10957,10961,10965,10969,10973,10977],{"type":35,"tag":247,"props":10958,"children":10959},{"style":280},[10960],{"type":41,"value":2523},{"type":35,"tag":247,"props":10962,"children":10963},{"style":270},[10964],{"type":41,"value":2848},{"type":35,"tag":247,"props":10966,"children":10967},{"style":280},[10968],{"type":41,"value":897},{"type":35,"tag":247,"props":10970,"children":10971},{"style":270},[10972],{"type":41,"value":2857},{"type":35,"tag":247,"props":10974,"children":10975},{"style":254},[10976],{"type":41,"value":1286},{"type":35,"tag":247,"props":10978,"children":10979},{"style":280},[10980],{"type":41,"value":2866},{"type":35,"tag":247,"props":10982,"children":10983},{"class":249,"line":286},[10984,10988,10992],{"type":35,"tag":247,"props":10985,"children":10986},{"style":280},[10987],{"type":41,"value":2874},{"type":35,"tag":247,"props":10989,"children":10990},{"style":270},[10991],{"type":41,"value":2879},{"type":35,"tag":247,"props":10993,"children":10994},{"style":280},[10995],{"type":41,"value":1529},{"type":35,"tag":247,"props":10997,"children":10998},{"class":249,"line":355},[10999,11003,11007],{"type":35,"tag":247,"props":11000,"children":11001},{"style":280},[11002],{"type":41,"value":2874},{"type":35,"tag":247,"props":11004,"children":11005},{"style":270},[11006],{"type":41,"value":2895},{"type":35,"tag":247,"props":11008,"children":11009},{"style":280},[11010],{"type":41,"value":1529},{"type":35,"tag":247,"props":11012,"children":11013},{"class":249,"line":412},[11014,11018,11022,11026],{"type":35,"tag":247,"props":11015,"children":11016},{"style":280},[11017],{"type":41,"value":2874},{"type":35,"tag":247,"props":11019,"children":11020},{"style":270},[11021],{"type":41,"value":2911},{"type":35,"tag":247,"props":11023,"children":11024},{"style":280},[11025],{"type":41,"value":2916},{"type":35,"tag":247,"props":11027,"children":11028},{"style":876},[11029],{"type":41,"value":2921},{"type":35,"tag":44,"props":11031,"children":11032},{},[11033],{"type":41,"value":2926},{"type":35,"tag":36,"props":11035,"children":11036},{"id":2929},[11037],{"type":41,"value":2932},{"type":35,"tag":44,"props":11039,"children":11040},{},[11041],{"type":41,"value":2937},{"type":35,"tag":2939,"props":11043,"children":11044},{},[11045,11053,11061],{"type":35,"tag":183,"props":11046,"children":11047},{},[11048,11052],{"type":35,"tag":105,"props":11049,"children":11050},{},[11051],{"type":41,"value":2949},{"type":41,"value":2951},{"type":35,"tag":183,"props":11054,"children":11055},{},[11056,11060],{"type":35,"tag":105,"props":11057,"children":11058},{},[11059],{"type":41,"value":2959},{"type":41,"value":2961},{"type":35,"tag":183,"props":11062,"children":11063},{},[11064,11068],{"type":35,"tag":105,"props":11065,"children":11066},{},[11067],{"type":41,"value":2969},{"type":41,"value":2971},{"type":35,"tag":44,"props":11070,"children":11071},{},[11072],{"type":41,"value":2976},{"type":35,"tag":2978,"props":11074,"children":11075},{},[11076],{"type":41,"value":2982},{"title":7,"searchDepth":286,"depth":286,"links":11078},[11079,11080,11081,11082,11083,11084,11085,11086],{"id":38,"depth":276,"text":42},{"id":56,"depth":276,"text":59},{"id":169,"depth":276,"text":172},{"id":668,"depth":276,"text":671},{"id":1710,"depth":276,"text":1713},{"id":2220,"depth":276,"text":2223},{"id":2804,"depth":276,"text":2807},{"id":2929,"depth":276,"text":2932},1777018791114]