This article explains how to perform load testing for scenarios where each row can be updated only once, using a thread‑safe queue to supply unique parameters to concurrent threads, and provides complete Java code examples for both a global queue and per‑thread queues.
The article explains how distributed cache consistency problems arise with read‑write operations, introduces the Cache‑Aside pattern and lazy‑deletion strategy, analyzes simple and complex inconsistency scenarios, and proposes a queue‑driven, serial processing solution with practical considerations for high‑concurrency backend systems.
This article examines common cache‑database consistency problems, explains why naive double‑write approaches fail, introduces the Cache‑Aside pattern, and proposes a queue‑based serialization solution with lazy cache updates to maintain data integrity under high‑traffic, concurrent read‑write workloads.
This guide defines and explains essential AMQP terminology—including virtual hosts, queues, exchanges, bindings, routing keys, producers, consumers, connections, and channels—to help developers grasp how message routing and queue management work in modern messaging systems.
The article explains why flash‑sale services need to shave traffic peaks and presents three practical, loss‑less techniques—using message queues to buffer bursts, adding a quiz step to delay and filter requests, and applying layered filtering across CDN, front‑end, back‑end and database—to achieve smoother processing and lower resource waste.
A sudden Dubbo service hang was traced to thread‑pool exhaustion after 500 concurrent HTTP calls, each blocked by an overly long read‑timeout and processed through a hidden 5‑thread queue, causing a 200‑second backlog that flooded the Dubbo pool with hundreds of thousands of tasks.
The article explains why interface-level failures occur, distinguishes internal and external causes, and presents four practical strategies—degradation, circuit breaking, rate limiting, and queuing—to keep core services running and protect most users under heavy load.
This article explains Java's three main concurrent queue implementations, advises using ConcurrentLinkedQueue for high-throughput request preprocessing, discusses proper design of flash-sale APIs, examines data-safety challenges such as overselling, and compares pessimistic, FIFO, and optimistic lock strategies to ensure correctness under extreme load.
This article explains the core concepts of stacks, queues, and priority queues, discusses their time complexities, and provides complete Java implementations using arrays, including methods for insertion, removal, peeking, and display, along with a circular array queue example.
This article systematically explains the most frequently used Java data structures—including LinkedList, ArrayList, Stack, Queue, HashMap, and LinkedHashMap—detailing their internal implementations, typical operations, performance characteristics, and providing illustrative code snippets and animations.
This article explains the differences between processes and threads, the role of Python's Global Interpreter Lock, how to create and manage threads with the thread and threading modules, and how to use synchronization primitives and the Queue module for producer‑consumer patterns.
This article explains the shortcomings of hard‑coded exposure tracking in the Beike Zhaofang Android app, benchmarks industry practices, proposes a flexible API‑driven strategy, and provides a complete RecyclerView scroll‑listener implementation with a double‑ended queue to record precise card visibility durations.
This article systematically explains common Java collection classes—including LinkedList, ArrayList, Stack, Queue, HashMap, and LinkedHashMap—highlighting their internal structures, key operations, performance characteristics, and JDK 8 differences, and it provides animated illustrations and full code snippets for each concept.
This article explains Python threading fundamentals, including thread context, kernel vs. user threads, the low‑level _thread module and the high‑level threading module, functional and class‑based thread creation, synchronization with locks, and using Queue for thread‑safe communication, all illustrated with complete code examples.
Redis, a powerful in‑memory data store, offers versatile capabilities beyond simple key‑value storage, and this article explores five common real‑world scenarios—full‑page caching, leaderboards, session storage, queues, and pub/sub—demonstrating how to leverage its rich data structures for faster, more reliable applications.
This article explores Hadoop YARN’s evolution, multi‑tenant design, queue and node‑label scheduling, real‑world resource allocation challenges, and data‑driven tools that automate diagnostics and visualizations to optimize CPU and memory usage across massive clusters.
This tutorial shows how to combine Python's threading and Queue modules to build a producer‑consumer multithreaded downloader for Tushare stock data, dramatically reducing download time from hours to under one hour.
The article analyzes a lottery‑service bottleneck caused by massive concurrent database reads and writes and presents a comprehensive set of backend optimization techniques—including caching, queue‑based peak‑shaving, optimistic locking, asynchronous processing, read‑write splitting, and semaphore‑based rate limiting—to improve throughput and stability under high load.
This article provides a comprehensive overview of Java's Collections Framework, explaining the purpose and hierarchy of core interfaces such as Collection, Iterable, Iterator, List, Set, Queue, and Map, along with their key methods and typical implementations.
This article analyzes the business model of flash‑sale (seckill) operations, enumerates the technical challenges such as impact on existing services, high‑concurrency load, bandwidth, order‑URL security, and proposes architectural principles, layered designs, queue choices, database sharding, scaling, overload protection, anti‑cheat measures, and data‑safety techniques to build a robust backend system.
The Disruptor library provides a lock‑free, CAS‑driven ring‑buffer queue that eliminates lock contention and false sharing, delivering 4–7× higher throughput and nanosecond‑level latency compared to Java’s built‑in queues, and is employed by systems such as Log4j 2, Apache Storm, and Meituan‑Dianping.
This article explains the concept of heaps, especially min‑heaps, and demonstrates how PHP's SPL provides ready‑made implementations for stacks, queues, min‑heaps, and fixed‑size arrays with clear code examples.
This article explains three ways to add priority handling to Redis queues—using a single list with head insertion, employing separate high‑ and normal‑priority lists with BRPOP, and leveraging score keys with sorting—detailing their advantages, drawbacks, and practical Redis command examples.
This article explains how to use Python's multiprocessing module to achieve true parallelism, covering Process creation, inter‑process synchronization primitives such as Lock, Semaphore, Event, communication tools like Queue and Pipe, and advanced patterns with Pool, all illustrated with runnable code examples.
This article explains how to implement a scalable timeline for a subscription feed by combining MongoDB storage with a Redis list cache, detailing the data model, query challenges, Redis operations for pushing and trimming statuses, rebuilding strategies, and handling data integrity trade‑offs.
This article examines key considerations for building highly scalable and available systems on Azure, outlining four architectural dimensions—scalability, availability, manageability, and feasibility—while discussing patterns, anti‑patterns, measurable resources, queue‑based load balancing, authentication services, and common pitfalls such as configuration errors and SQL injection.
This article explains the Linux TCP connection‑establishment, packet‑receive, and packet‑send paths, categorizes related kernel parameters such as backlog, SYN‑cookie, ring buffers, and socket buffers, and provides practical commands and guidelines for optimizing network performance on servers.