Azure Architecture Guide

CH15-05: Reliability, Observability, Security, and Cost

Goal

The previous section separated immediate checkout decisions from durable asynchronous work. This section adds the operating design around those paths: reliability, graceful degradation, observability, security, fraud controls, privacy, and cost.

The durable idea is:

Commerce reliability is measured by customer-visible outcomes, not only service uptime.

The Short Version

A commerce platform can have many healthy components and still fail the customer journey. If product pages load but checkout cannot create orders, the business is unhealthy. If orders exist but support cannot see status, customers lose trust. If notifications fail silently, operations learns about the problem from customers. If logs contain sensitive data, observability becomes a security risk.

Operations should be designed around journeys:

Journey -> health signal -> alert owner -> fallback behavior -> recovery path

This is how reliability, observability, security, and cost become architecture decisions instead of late-stage checklists.

Reliability by Journey

Reliability targets should follow business impact.

JourneyReliability GoalPossible Fallback
Browse and campaign pagesKeep discovery available during traffic spikes.Cached pages, simplified content, fewer personalized elements.
SearchKeep product discovery usable.Basic ranking, reduced facets, cached popular queries.
Product detailKeep core purchase information trustworthy.Hide slow recommendations or reviews; keep price and availability rules clear.
CartPreserve customer intent.Retry updates, recover session, show clear unavailable-item messages.
CheckoutProtect order correctness and customer outcome.Queue noncritical work, return pending state when appropriate, prevent duplicates.
Order statusShow reliable customer and support truth.Display delayed fulfillment status with clear messaging.
NotificationsCommunicate reliably without blocking order creation.Retry, alternate channel, support-visible communication history.

Azure Well-Architected reliability guidance emphasizes business requirements, resilience, recovery, operations, and simplicity. For commerce, that means the team should identify critical flows, set reliability targets for those flows, analyze failure modes, and test recovery behavior.

Graceful Degradation

Graceful degradation is deliberate. It is not the same as letting features break.

During peak load, the platform might choose to:

  • Serve static campaign assets and cached product content from the edge.

  • Reduce personalization or recommendation calls.

  • Temporarily hide reviews, comparisons, or noncritical merchandising modules.

  • Use a simpler search experience if advanced filters are slow.

  • Preserve cart and checkout capacity for serious buyers.

  • Queue downstream fulfillment and notification work instead of blocking confirmation.

The design must make these choices possible. If the product page requires every dependency to respond before it renders, then no feature is truly optional. If checkout calls every downstream system synchronously, then there is no protected checkout path.

Observability Across the Journey

Observability should follow one customer action across the platform.

For a checkout flow, useful telemetry includes:

  • Edge request volume, latency, WAF blocks, and origin health.

  • API gateway request counts, authentication failures, throttling, policy failures, and consumer identity.

  • Checkout API latency, validation outcomes, payment provider latency, fraud decision outcomes, and order creation results.

  • Database latency, errors, deadlocks, capacity pressure, and retry behavior.

  • Service Bus queue depth, message age, retry count, and dead-letter count.

  • Worker success, failure, and processing time.

  • Notification send attempts, failures, retries, and provider errors.

  • Correlation IDs that connect the customer request to downstream messages and logs.

The team should also define business signals: checkout success rate, order creation rate, payment timeout rate, duplicate order attempts, orders stuck in pending state, and customer communication delay.

Infrastructure metrics tell you whether components are alive. Journey metrics tell you whether the business flow is healthy.

Security, Fraud, and Privacy Controls

Commerce platforms have a large public surface. Security design should protect confidentiality, integrity, and availability across the journey.

At the edge, Web Application Firewall and DDoS-aware design help protect public entry points. At the API boundary, policies can enforce authentication, authorization, quotas, request validation, and partner-specific controls. Inside the platform, managed identities reduce the need for stored credentials, and Key Vault centralizes secret handling where secrets remain necessary. Private networking and segmentation can reduce unnecessary exposure of data stores and internal services.

Fraud and privacy need their own attention. Fraud controls may inspect account behavior, payment attempts, device or session signals, address changes, refund patterns, and unusual order behavior. Privacy controls should limit what customer data is collected, where it is stored, who can see it, and what appears in logs. Support access should be privileged, auditable, and role-aware.

Do not log full payment details, secrets, tokens, or sensitive personal data just because troubleshooting is easier with more information. Good observability is precise, not careless.

Cost Controls

Successful commerce traffic can create expensive cloud behavior.

Cost drivers include edge traffic, compute scale-out, API gateway capacity, search indexing, database throughput, cache size, queue and event volume, logs, metrics, traces, storage retention, and third-party provider calls.

Cost optimization is not only about spending less. It is about spending deliberately.

Cost AreaDesign Question
Peak computeWhich services should scale with traffic, and what limits protect runaway behavior?
Search and catalogHow often should indexes refresh, and which queries are expensive?
LoggingWhich telemetry is needed for operations, and how long should it be retained?
MessagingAre events and messages useful business signals or noisy duplicates?
DataWhich stores need premium performance, replicas, backups, or long retention?
Third-party callsWhich provider calls happen per request, and can they be cached, batched, or moved async?

Cost controls should not damage the critical journey. Cutting checkout telemetry to save money may make incidents more expensive. Over-scaling recommendations while checkout queues grow is also wasteful. Cost and reliability should be reviewed together.

Example: Holiday Sale Under Pressure

A holiday sale causes catalog traffic to surge. The product detail page becomes slower because recommendations and reviews are under pressure.

A resilient design keeps the core journey alive. Azure Front Door and caching help absorb static and read-heavy traffic. The product page can omit recommendations and use cached review summaries. Search can use simpler ranking. Cart and checkout capacity are protected. Order creation writes durable state, then downstream work continues through Service Bus and workers. Azure Monitor dashboards show product-page latency, checkout success rate, queue age, payment errors, and notification delay.

Customers may notice fewer optional features. They should not see random checkout failures, duplicate orders, or missing order history.

Common Mistakes

  • Monitoring only infrastructure health rather than business journey health. CPU and memory are not enough to explain checkout success.

  • Treating fraud and privacy as later security reviews. They shape data, logging, API, and workflow design.

  • Scaling everything equally instead of protecting revenue-critical paths.

  • Collecting logs with sensitive data. This creates risk while pretending to improve support.

  • Creating alerts without owners, runbooks, or customer-impact language.

If Someone Asks You

I would make the platform resilient by identifying critical customer journeys, especially product discovery, cart, checkout, order confirmation, and order status. I would design graceful degradation for noncritical features, protect checkout capacity, use durable messaging for downstream work, monitor journey-level health with correlation IDs, secure public and internal boundaries, control sensitive data in logs, and track cost drivers such as scale-out, search, messaging, and telemetry.

What You Should Remember

Protect the journeys customers notice first, then prove their health with telemetry.

Questions to Check Your Understanding

  1. Which commerce features can degrade gracefully?

  2. What telemetry would show checkout health?

  3. Why does cost control matter during successful traffic spikes?