Search
Lessons (40)
- C4 Architecture Diagrams: Context, Container, Component and Code
… Order) void } CheckoutController -- CheckoutService : calls CheckoutService -- CatalogService : reserves items CheckoutService -- PaymentGateway : charges card CheckoutService -- OrderRepository : saves order CheckoutService …
- Design an E-Commerce Checkout
Let browsing be fast and loose, but make the checkout path exact: hold the stock, charge once even …
- Observability and Incident Response
… If checkout success is back up, you're recovering. Walk through a failure Checkout calls payment. Payment accepts …
- Architecture Patterns at Scale
… Debugging one checkout bug means reading logs from 6 services . 4. The catalog service goes down and checkout …
- Abstraction
… string) { return this.payments.charge(orderTotal, cardToken); } } new Checkout(new StripeGateway()); // production new Checkout(new FakeGateway()); // tests Checkout …
- Behavioral Interviews with the STAR Method
… During a sale our checkout API started timing out for 20% of users. - T : I was on call …
- AWS Messaging: Queues, Topics and Events
… A message lets checkout save the order quickly and hand the email work to another worker. mermaid flowchart …
- Releases, Observability and Production Safety
… a target like "99.9% of checkouts succeed." A pizza place promising delivery in 30 minutes. The fix …
- Resilient Service Calls: Retries, Breakers and Load Shedding
… It fails, so checkout tries 3 times. 2. The gateway sees checkout fail, so it tries checkout 3 …
- Capacity, Availability, Latency and CAP
… A product description or a search result a few minutes old is fine, because the checkout step checks …
- Capacity Planning, SLOs and Error Budgets
… checkout API Question Clear answer --- --- How fast? 99% of POST /checkout requests finish in under 800 ms. How …
- Debug Latency Like an Investigator
… Split the time, then compare Take a trace of a fast checkout from before the release and a …
- Frontend Testing Strategy
… sign up, log in, checkout, payment. ts // e2e/checkout.spec.ts import { test, expect } from "@playwright/test"; test …
- CloudWatch: Know What Your App Is Doing
… checkout latency increases Suppose users report that checkout takes eight seconds. Begin with the time window and affected …
- The L6 System-Design Thinking Loop
… Peak The busiest moment, not the average. The checkout lines on the day before a holiday. Failure window …
- Caching, Consistent Hashing and Sharding
… Meanwhile, some users still see the old price from the cache and get a nasty surprise at checkout …
- Resilience Patterns
… A slow recommendations service can then exhaust only its pool, while checkout keeps working. mermaid flowchart LR subgraph …
- Comments & Formatting
… separate ideas js // ❌ A wall of text function checkout(cart){const total=sum(cart);if(total 100){applyDiscount …
- CI/CD with GitHub Actions
… actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 cache: npm reuse downloaded packages between …
- Batch vs Stream and Data Modeling
… Meanwhile, the fraud checker reads from the same busy database as checkout, and slows checkout down. Fast and …
- Small Functions That Do One Thing
… High level and low level mixed together function checkout(cart) { applyDiscounts(cart); let total = 0; for (const item …
- Payment Retries: Prevent Duplicate Charges
… The browser creates one random key when the customer starts this checkout attempt. 2. The API saves payment …
- Topics, Partitions & Offsets
… A Kafka topic is the store; its partitions are the checkout lanes. ![A topic split into partitions; the …
- Onion Architecture & Clean vs Hexagonal vs Onion
… Application services Use cases / workflows orchestrating the domain CheckoutService.placeOrder() 🟣 Outer ring: infrastructure, UI, tests Implementations of …
- Referrals, Cold Outreach and Tracking Applications
… At my current company I cut checkout failures by 32% by adding idempotency keys and retries to our …
- AWS Data Pipelines in Plain Language
… Partition files by a field you filter often, such as date. A report that does not burden checkout …
- A Resume That Gets Shortlisted
… endpoints in NestJS for the order service, cutting checkout errors by 32% and p95 latency from 900 ms …
- Structural Patterns: How to Connect Objects
… inventory, payment, shipping, email… class CheckoutFacade { constructor({ inventory, payments, shipping, mailer }) { Object.assign(this, { inventory, payments, shipping, mailer …
- Design a Logging and Monitoring Platform
… objective, a target like "99.9% of checkouts succeed"). "Checkout errors are above 1%" is useful. "CPU at …
- Timeouts, Retries & Backpressure
… a worked example The user will wait 1,000 ms for checkout. Here's one way to split …
- CI/CD and Reviewed Production Changes
… shell sequence assumes a configured backend, trusted source checkout, and short-lived credentials supplied by the CI platform …
- AWS Interview Questions: Clear Answers
… automatically retry Lambda invocations. Example: a customer retrying checkout can still create duplicate orders unless you implement durable …
- I — Interface Segregation Principle
… OrderReader) {} } // can't delete by accident class CheckoutService { constructor(private orders: OrderReader & OrderWriter) {} } Key takeaways - Many small, focused …
- Go Fundamentals
… Checkout(userID string) error { u, err := svc.store.FindUser(userID) if err != nil { return fmt.Errorf("checkout for …
- Polymorphism
… balance -= amount; return Paid $${amount} from wallet ; } } function checkout(total: number, method: PaymentMethod) { return method.pay(total); // works …
- Behavioral Patterns I: Observer, Strategy, Command, State
… standard; return strategy(order); } mermaid flowchart LR Ctx["Checkout<br/ (context)"] -- S{{"strategy(order)"}} S -- A[standard: 5 …
- API Gateway, BFF & Service Discovery
… O2[orders instance 2] -- register + heartbeat Registry C[Checkout svc] -- "where is orders?" Registry Registry -- "10.0.1 …
- Deploying & Operating Microservices
… without redeploying. js if (await flags.isEnabled("new-checkout", { userId: user.id, country: user.country })) { return renderNewCheckout(); } return …
- Observability: Logs, Metrics & Traces
… GET /checkout (total 820 ms) dateFormat x axisFormat %L section api-gateway gateway :0, 820 section orders-svc …
- Atomic Design & Component Libraries
… field, Form field] M -- O[Organisms<br/ Header, Checkout form, Product card] O -- T[Templates<br/ Dashboard or …