#Architecture
42 posts tagged with this topic. ← All tags
-
Database sharding: when vertical scaling isn't enough.
Sharding partitions data across multiple database instances. Here's how the partitioning strategies work and what operational complexity they introduce.
-
API design review: 10 questions before you call an endpoint done.
A checklist of design decisions that are easy to skip when building an endpoint and painful to change after consumers depend on it.
-
gRPC: when REST isn't the right protocol.
gRPC trades REST's universality for performance, strict contracts, and bidirectional streaming. Here's what that trade buys you and when it's worth making.
-
Form libraries: when Formik, React Hook Form, and none are each correct.
A practical comparison of form handling approaches in React -- uncontrolled forms, React Hook Form, and Formik -- with guidance on when each makes sense.
-
React Query vs RTK Query: the actual differences.
A concrete comparison of TanStack Query and RTK Query -- what each does well, where they diverge, and how to choose.
-
Zustand vs Redux: when the simpler store is the right choice.
What Zustand does differently from Redux, the concrete cases where each is the better fit, and what you actually give up going simpler.
-
RTK Query cache invalidation: the tags system that keeps UI in sync.
How RTK Query's tag-based cache invalidation works, how to configure it, and the patterns for keeping your UI consistent after mutations.
-
Streaming HTML: sending the page before all the data is ready.
How HTTP streaming works with React and Next.js, the role of Suspense boundaries, and why it improves Time to First Byte.
-
Server actions: mutations without an API endpoint.
How Next.js Server Actions work, what they replace, the security model, and when they're the right choice over a dedicated API route.
-
Concurrent React: what startTransition actually does.
How React's concurrent features work, what startTransition is for, and the difference between urgent and non-urgent state updates.
-
React.memo: when it helps and when it makes things worse.
How React.memo works, the cases where it actually improves performance, and the common misuse that wastes memory without helping.
-
Turbopack vs webpack: what's actually faster.
What Turbopack is, how it differs from webpack architecturally, what the benchmarks measure, and where it stands today.
-
Next.js app router: what changed and why it matters.
The key differences between Next.js pages router and app router -- React Server Components, layouts, streaming, and the new data fetching model.
-
Service worker caching: the strategies that make apps load faster.
The five service worker caching strategies, when to use each, and how to implement them with Workbox.
-
CSS containment: the property that isolates layout recalculations.
How the CSS contain property works, what containment types exist, and how content-visibility accelerates rendering of off-screen content.
-
Font loading: the FOUT/FOIT problem and the CSS that fixes it.
Why web fonts cause layout shift and invisible text, and how font-display, preload, and size-adjust solve it.
-
Web performance budgets: setting numbers before you regress past them.
How to define performance budgets, integrate them into CI, and use them to keep Core Web Vitals from degrading over time.
-
Module federation: sharing code between independently deployed frontends.
How Webpack Module Federation works, when micro-frontends make sense, and the pitfalls of sharing code across deployment boundaries.
-
Full-text search: when PostgreSQL is enough and when it isn't.
How PostgreSQL full-text search works, its real limitations, and what Elasticsearch and Typesense add that PostgreSQL can't.
-
A/B testing infrastructure: the backend plumbing for controlled experiments.
How to build reliable experiment assignment, the data pipeline for measuring results, and the guardrails that prevent experiments from breaking production.
-
Secrets management: the patterns that don't leak credentials.
Why .env files are not enough, and the tools and patterns that keep database passwords, API keys, and certificates out of your git history.
-
Zero-trust networking: the security model that assumes breach.
What zero-trust means in practice, why the perimeter model failed, and the concrete controls that implement it.
-
Kubernetes basics: the problem it solves and the concepts you need first.
What Kubernetes actually does, the core abstractions you need to understand, and when it's overkill.
-
Infrastructure as code: managing cloud resources from version control.
What infrastructure as code is, why it matters, and how Terraform and Pulumi approach the problem differently.
-
V8 internals: JIT compilation and what deoptimizes your hot paths.
How V8 moves from interpreted bytecode to optimized machine code, and the specific conditions that cause it to throw that work away.
-
JavaScript engine optimization: the hidden classes that matter.
How V8 and other JS engines optimize objects using hidden classes, and the coding patterns that keep your code on the fast path.
-
Memory management in JavaScript: GC, leaks, and the heap snapshot.
How JavaScript's garbage collector works, what causes memory leaks, and how to find them with a heap snapshot in Chrome DevTools.
-
The browser rendering pipeline: DOM, CSSOM, layout, paint, composite.
How the browser turns HTML and CSS into pixels on screen, and what that means for writing performant web code.
-
Monorepo basics: when one repo actually makes sense.
What monorepos solve, the tooling that makes them workable, and the tradeoffs you accept when you put everything in one place.
-
Dependency audits: finding vulnerabilities before they become your problem.
How npm audit works, what the output means, and a practical workflow for keeping your dependency tree clean.
-
npm scripts: the task runner you already have but probably underuse.
How npm scripts work, the lifecycle hooks available, and patterns that replace external task runners for most projects.
-
Semantic versioning: what the 3 numbers mean and when to bump each.
A practical guide to semver -- MAJOR.MINOR.PATCH -- with real rules for when to increment each and how package managers use it.
-
Backpressure: what happens when your consumer is slower than your producer.
Understanding backpressure in data pipelines, streams, and message queues -- and the patterns that prevent your system from falling over.
-
Event sourcing: storing what happened instead of the current state.
How event sourcing works, why it gives you a complete audit log, and when the complexity is worth it.
-
CQRS: separating reads and writes when they have different needs.
CQRS splits your application into two models — one optimized for commands, one for queries. Here's when that separation earns its complexity.
-
The CAP theorem: what distributed systems can and can't guarantee.
What the CAP theorem actually says, how real databases position themselves, and what this means when choosing a data store.
-
Circuit breakers: stopping a cascade failure before it takes everything down.
How the circuit breaker pattern prevents cascade failures in distributed systems, with a Node.js implementation.
-
Load balancing: distributing traffic without a single point of failure.
How load balancers distribute traffic across server instances, the algorithms they use, and how health checks keep traffic away from failed instances.
-
The 12-factor app: principles that make deployment not a surprise.
A practical walkthrough of the 12-factor app methodology and how each factor prevents the common failure modes of deployment.
-
Event-driven architecture: the pattern that decouples services.
How event-driven architecture works, when to use it, and how to implement it with a message broker versus direct event emission.
-
Scaling WebSocket servers: why sticky sessions aren't the only answer.
WebSockets make horizontal scaling harder than stateless HTTP. Sticky sessions are the simple solution. Redis pub/sub is the scalable one. When each approach is right.
-
Broadcasting to multiple clients: the pub/sub pattern.
When a WebSocket server needs to send a message to many clients, pub/sub is the natural model. How to implement channels, subscriptions, and broadcasts in Node.js.