Blogs

Read published articles from MarkStack writers.

Backend Security: Think Like an Attacker, Build Like an Engineer
/backend-security-think-like-an-attacker-build-like-an-engineer

Master backend security by understanding the mechanics behind real-world attacks and their defenses. Explore SQL Injection, NoSQL Injection, XSS, CSRF, SSRF, BOLA/IDOR, JWTs, Sessions, Password Security, Race Conditions, API Security, and production hardening through practical examples.

Kartikey Bhatnagar
Updated about 11 hours ago
Optimizing Tree Traversal with BFS
/optimizing-tree-traversal-with-bfs

Learn how a level-by-level BFS eliminates the N+1 query problem by batching database queries, making hierarchical tree traversal faster and more scalable.

Kartikey Bhatnagar
Updated 6 days ago
How Graceful Shutdown Works in Production Backend Systems
/how-graceful-shutdown-works-in-production-backend-systems

Explore why backend services shouldn't stop abruptly. Learn how operating systems signal processes, how servers drain connections, clean up resources, and shut down safely with a real Node.js example.

Kartikey Bhatnagar
Updated 26 days ago
How Modern Backends Are Debugged
/how-modern-backends-are-debugged

Understand how modern backend teams use structured logging, metrics, distributed tracing, and production debugging with OpenTelemetry and modern observability tools.

Kartikey Bhatnagar
Updated about 1 month ago
Backend Configuration Management: Beyond .env Files
/backend-configuration-management-beyond-env-files

Learn how production backends manage configuration from environment variables and secrets to feature flags, validation, and environment-specific settings.

Kartikey Bhatnagar
Updated about 1 month ago
Understanding Backend Concurrency: Threads, Event Loops, and Virtual Threads
/understanding-backend-concurrency-threads-event-loops-and-virtual-threads

How modern systems handle thousands of requests efficiently and the trade-offs behind the most common concurrency models.

Kartikey Bhatnagar
Updated about 1 month ago
Error Handling and Building Fault-Tolerant Backends: An Engineering Approach
/error-handling-and-building-fault-tolerant-backends-an-engineering-approach

Learn how production systems handle database failures, API outages, validation errors, and unexpected exceptions through centralized error handling, recovery strategies, monitoring, and graceful degradation.

Kartikey Bhatnagar
Updated about 1 month ago
PostgreSQL vs Elasticsearch: Understanding Search at Scale
/postgresql-vs-elasticsearch-understanding-search-at-scale

Learn why traditional SQL searches slow down at scale, how inverted indexes work, why relevance scoring matters, and when to use PostgreSQL Full-Text Search v/s Elasticsearch for production search workloads.

Kartikey Bhatnagar
Updated about 1 month ago
From Cloud-First to Local-First: Architectures, Sync, and CRDTs
/from-cloud-first-to-local-first-architectures-sync-and-crdts

Exploring application architectures, synchronization models, and the role of CRDTs in building collaborative local-first software

Kartikey Bhatnagar
Updated about 1 month ago
Local-First Architecture: Building Applications That Work Offline
/local-first-architecture-building-applications-that-work-offline

Understanding how local-first software enables offline-first experiences, real-time sync, and user-owned data.

Kartikey Bhatnagar
Updated about 1 month ago
Caching: From CPU Registers to Distributed Systems
/caching-from-cpu-registers-to-distributed-systems

Learn how caching works across hardware, networks, and backend applications, including CDNs, Redis, cache-aside patterns, eviction policies, and real-world scaling strategies.

Kartikey Bhatnagar
Updated about 2 months ago
Background Tasks & Message Queues: Building Resilient Asynchronous Backends
/background-tasks-message-queues-building-resilient-asynchronous-backends

Learn how producers, brokers, and workers power scalable backend systems with retries, DLQs, idempotency, and fault-tolerant asynchronous processing.

Kartikey Bhatnagar
Updated about 1 month ago
Backend Databases: From Schema to Scale
/backend-databases-from-schema-to-scale

Learn database fundamentals, PostgreSQL, schema design, migrations, querying, indexing, and triggers for building scalable backend systems.

Kartikey Bhatnagar
Updated about 2 months ago
API Design That Doesn’t Break at Scale
/api-design-that-doesnt-break-at-scale

Build clean, predictable REST APIs with proper URL structure, HTTP methods, pagination, filtering, and scalable design patterns.

Kartikey Bhatnagar
Updated about 2 months ago
Handlers, Services, Middleware & Context
/handlers-services-middleware-context

Learn how production backends structure requests using handlers, services, repositories, middleware, and request context to build clean, scalable, and maintainable systems.

Kartikey Bhatnagar
Updated about 2 months ago
API Data Handling
/api-data-handling

From request validation to data transformation, learn the patterns that make APIs secure, maintainable, and resilient.

Kartikey Bhatnagar
Updated about 2 months ago
Rate Limiting
/rate-limiting

Learn how to build a scalable Redis-backed rate limiter with Express from connection handling and route-specific limits to fail-open strategies, monitoring, and production best practices.

Kartikey Bhatnagar
Updated about 1 month ago
Authentication and Authorization
/authentication-and-authorization

Master authentication and authorization fundamentals: historical context, sessions, JWTs, OAuth 2.0, OpenID Connect, RBAC, and security best practices for building secure backend systems.

Kartikey Bhatnagar
Updated about 2 months ago
Serialization and Deserialization: Data Flow Between Clients and Servers
/serialization-and-deserialization-data-flow-between-clients-and-servers

Master serialization fundamentals: JSON, data formats, cross-language communication, and OSI model context for robust backend systems.

Kartikey Bhatnagar
Updated about 2 months ago
Routing in Web Applications: URL Design and Request Mapping
/routing-in-web-applications-url-design-and-request-mapping

Master HTTP routing: static and dynamic routes, path vs query parameters, nested resources, versioning, and catch-all handlers for scalable APIs.

Kartikey Bhatnagar
Updated about 2 months ago
HTTP Protocol: The Foundation of Web Communication
/http-protocol-the-foundation-of-web-communication

Master HTTP fundamentals: methods, headers, status codes, CORS, caching & TLS to build reliable, scalable backend systems.

Kartikey Bhatnagar
Updated about 2 months ago
What Is a Backend? The Server-Side Architecture
/what-is-a-backend-the-server-side-architecture

Learn what a backend is, how requests flow through DNS, firewalls & servers, and why backend logic can't live in the frontend.

Kartikey Bhatnagar
Updated about 2 months ago
Beyond CRUD: The Backend Engineering Playbook
/beyond-crud-the-backend-engineering-playbook

Master HTTP, middleware, auth, caching & observability to build production-ready backend systems that scale.

Kartikey Bhatnagar
Updated about 2 months ago