🌍 Back-end Web Developement · subject

Back-end Web Developement Performance Optimization Syllabus

Every chapter and topic of Performance Optimization examined in Back-end Web Developement — 3 chapters, 9 topics, plus 51 flashcards written against it.

3Chapters
9Topics
0Sub-topics
~7hEst. first pass
13%Of Back-end Web Developement
51Flashcards

Performance Optimization syllabus — full chapter and topic list

Expand any chapter to see its topics and sub-topics. This is the whole examinable outline for Performance Optimization in Back-end Web Developement, not a summary of it.

  1. Caching

    3 topics
    • Redis
    • Memcached
    • CDN
  2. Load Balancing

    3 topics
    • Round Robin
    • Least Connections
    • IP Hash
  3. Profiling & Monitoring

    3 topics
    • New Relic
    • Prometheus
    • Grafana

Performance Optimization flashcards for Back-end Web Developement

23 of 51 cards from the Performance Optimization deck — real questions with worked answers.

  1. What is Redis, and what type of data store is it?

    Redis (REmote DIctionary Server) is an open-source, in-memory data structure store used as a database, cache, and message broker. It keeps data in RAM for microsecond-level access and can optionally persist to disk.

  2. Name five core data structures natively supported by Redis.

    Strings, Lists, Sets, Sorted Sets (ZSets), and Hashes. It also supports Bitmaps, HyperLogLog, Streams, and Geospatial indexes.

  3. What two persistence mechanisms does Redis offer?

    RDB (Redis Database) point-in-time snapshots, and AOF (Append-Only File) which logs every write operation. They can be used separately or together for durability.

  4. Is Redis single-threaded or multi-threaded for command execution?

    Redis executes commands on a single main thread (an event loop), which guarantees atomicity per command. Recent versions add threaded I/O for network reads/writes, but command processing remains single-threaded.

  5. What is Memcached, and what is its primary use case?

    Memcached is an open-source, high-performance, distributed in-memory key-value store designed for caching. Its primary use is to speed up dynamic web applications by caching results of database calls, API calls, or page rendering.

  6. How does Memcached handle threading compared to Redis?

    Memcached is multi-threaded, scaling across multiple CPU cores for high-throughput simple key-value workloads. Redis is (for command execution) single-threaded.

  7. Compare Redis and Memcached on data structures and persistence.

    Redis supports rich data structures (lists, sets, hashes, sorted sets) and offers persistence (RDB/AOF), replication, and clustering. Memcached supports only simple string key-value pairs, is multi-threaded, and offers no persistence or replication.

  8. What eviction algorithm does Memcached primarily use when memory is full?

    LRU (Least Recently Used). Memcached uses a slab allocator and evicts the least recently used items within a slab class when memory limits are reached.

  9. Define the cache hit ratio and give its formula.

    The cache hit ratio is the fraction of requests served from the cache. $$\text{Hit Ratio} = \frac{\text{Cache Hits}}{\text{Cache Hits} + \text{Cache Misses}}$$

  10. Define cache miss ratio in terms of hit ratio.

    $$\text{Miss Ratio} = 1 - \text{Hit Ratio} = \frac{\text{Cache Misses}}{\text{Total Requests}}$$

  11. Give the formula for the effective (average) access time of a two-level system with a cache in front of a slower store.

    $$T_{\text{avg}} = H \cdot T_{\text{cache}} + (1 - H) \cdot T_{\text{store}}$$ where $H$ is the hit ratio, $T_{\text{cache}}$ the cache access time, and $T_{\text{store}}$ the backing-store access time.

  12. What is TTL (Time To Live) in the context of caching?

    TTL is the expiration time assigned to a cached entry. After the TTL elapses, the entry is considered stale and is evicted or refreshed. It bounds data staleness and helps free memory.

  13. Explain the cache-aside (lazy loading) caching pattern.

    The application first checks the cache. On a hit it returns the cached value; on a miss it reads from the database, writes the result into the cache, then returns it. The cache is populated lazily on demand.

  14. Explain the write-through caching strategy.

    In write-through, every write goes to both the cache and the backing database synchronously. This keeps the cache always consistent with the database at the cost of higher write latency.

  15. Explain the write-back (write-behind) caching strategy and its main risk.

    In write-back, writes go to the cache first and are asynchronously flushed to the database later. It gives low write latency and high throughput, but risks data loss if the cache fails before the flush completes.

  16. What is a cache stampede (thundering herd), and one way to mitigate it?

    A cache stampede occurs when a popular key expires and many concurrent requests simultaneously miss and hit the database. Mitigations include request coalescing/locking (only one recompute), staggered TTLs (jitter), or early/probabilistic refresh.

  17. Define cache penetration and how it differs from a stampede.

    Cache penetration is repeated querying for keys that do not exist in cache or database, so every request bypasses the cache and hits the backend. It differs from a stampede (which involves valid but expired keys). Mitigation: cache null results or use a Bloom filter.

  18. What is a CDN and what problem does it solve?

    A CDN (Content Delivery Network) is a geographically distributed network of edge servers that cache and serve content close to end users. It reduces latency, offloads origin servers, and improves availability and throughput for static and cacheable content.

  19. What is an 'edge server' (PoP) in a CDN?

    An edge server, located at a Point of Presence (PoP), is a CDN cache node positioned geographically near end users. It serves cached content locally to minimize round-trip distance to the origin.

  20. How does a CDN reduce latency? Reference the role of distance.

    A CDN reduces the physical distance data travels, lowering propagation delay. Since $t_{\text{prop}} = \frac{d}{v}$ (distance over propagation speed), serving from a nearby edge shortens $d$ and thus round-trip time, in addition to reducing origin load.

  21. Distinguish a CDN cache HIT, MISS, and origin fetch.

    A HIT means the edge serves content directly from its cache. A MISS means the edge lacks the content, so it fetches from the origin (or an upstream tier), caches it, then serves it. The origin fetch adds latency only on the miss.

  22. What is cache invalidation / purging in a CDN?

    Purging (invalidation) removes or marks stale specific cached objects at the edge so the CDN re-fetches fresh content from the origin. It is used when content changes before its TTL expires.

  23. What HTTP header primarily controls how long a CDN/browser caches an object?

    The Cache-Control header (e.g., max-age, s-maxage, no-cache, private/public). s-maxage specifically targets shared caches like CDNs; Expires and ETag also influence caching and revalidation.

See more Performance Optimization flashcards →

Planning Performance Optimization for Back-end Web Developement

Performance Optimization is about 13% of the Back-end Web Developement syllabus by topic count — 9 of 67 topics, spread over 3 chapters. At roughly 45 minutes per topic plus 12 minutes per sub-topic, a first pass runs to about 7 hours.

The heaviest chapters are Caching (3 topics), Load Balancing (3 topics), Profiling & Monitoring (3 topics) . Front-load those while your energy is high; the short chapters are better revision filler later.

Work top-down: read the chapter, then tick topics off individually rather than marking the whole chapter done. Sub-topics are where silent gaps hide.

Performance Optimization (Back-end Web Developement) FAQ

What is in the Back-end Web Developement Performance Optimization syllabus?

Performance Optimization is split into 3 chapters — Caching, Load Balancing and Profiling & Monitoring, containing 9 topics and 0 sub-topics in total.

How is Performance Optimization structured in the Back-end Web Developement syllabus?

3 chapters. Performance Optimization accounts for about 13% of the topics in the whole Back-end Web Developement syllabus (9 of 67).

How long should I spend on Performance Optimization for Back-end Web Developement?

Budget around 7 hours for a first pass through Performance Optimization — about 45 minutes per topic plus 12 minutes per sub-topic across its 9 topics. Add revision cycles on top.

Are there flashcards for Back-end Web Developement Performance Optimization?

Yes — a 51-card Performance Optimization deck. Sample cards are printed on this page, and the full deck is free in the Examius app with spaced repetition scheduling.