🌍 Back-end Web Developement · flashcards

Back-end Web Developement Performance Optimization Flashcards

51 question-and-answer cards covering Performance Optimization as it is examined in Back-end Web Developement. 24 of them are printed below, taken from across the deck — no signup, no paywall on the preview.

51Cards in deck
24Free preview
9Syllabus topics
~208Chars per answer
FreePrice

24 sample cards from the Performance Optimization deck

Sampled from the end of the deck, so these are different cards from the ones shown on the syllabus page.

  1. Describe Weighted Round Robin and its purpose.

    Weighted Round Robin assigns each server a weight proportional to its capacity; higher-weight servers receive proportionally more requests within each cycle. It handles heterogeneous server capacities that plain Round Robin cannot.

  2. In Weighted Round Robin, what fraction of traffic does server i with weight $w_i$ receive?

    $$\text{fraction}_i = \frac{w_i}{\sum_{j=1}^{n} w_j}$$

  3. Describe the Least Connections load-balancing algorithm.

    Least Connections routes each new request to the server currently handling the fewest active connections. It adapts to real-time load and suits long-lived or variable-duration connections better than Round Robin.

  4. When is Least Connections preferable to Round Robin?

    When requests have widely varying durations or resource costs (e.g., long-lived sessions, streaming, WebSockets). Least Connections balances by actual concurrent load rather than raw request count, avoiding pile-up on slow servers.

  5. What is Weighted Least Connections?

    A variant that selects the server minimizing the ratio of active connections to its weight (capacity), i.e., it picks the server with the smallest $\frac{\text{active connections}_i}{w_i}$, combining real-time load with server capacity.

  6. Describe the IP Hash load-balancing algorithm.

    IP Hash computes a hash of the client's source IP address (sometimes source+destination) and uses it to deterministically select a backend server. The same client IP consistently maps to the same server, providing session affinity (sticky sessions).

  7. For IP Hash across n servers, express which server a client is assigned to.

    $$\text{server} = \text{hash}(\text{client IP}) \bmod n$$ mapping the hashed IP deterministically to one of the $n$ servers.

  8. What is the primary advantage and the primary drawback of IP Hash?

    Advantage: session persistence without shared session storage, since a client always reaches the same server. Drawback: uneven distribution if client IPs cluster (e.g., behind NAT/proxies), and remapping when the server count $n$ changes (unless consistent hashing is used).

  9. Why does consistent hashing improve on plain modulo IP Hash when servers are added or removed?

    With plain $\text{hash} \bmod n$, changing $n$ remaps almost all keys. Consistent hashing places servers and keys on a hash ring so that adding/removing a server only remaps about $\frac{1}{n}$ (K/n) of the keys, minimizing cache/session disruption.

  10. Classify Round Robin, Least Connections, and IP Hash as static or dynamic algorithms.

    Round Robin and IP Hash are static (decisions based on fixed rules/hashing, not live server state). Least Connections is dynamic (decisions based on real-time active-connection counts).

  11. What is New Relic, and what category of tool is it?

    New Relic is a commercial SaaS observability and Application Performance Monitoring (APM) platform. It collects metrics, traces, logs, and events from applications and infrastructure to monitor performance, errors, and user experience.

  12. What is Apdex, the score New Relic uses, and give its formula.

    Apdex (Application Performance Index) measures user satisfaction with response times against a target threshold $T$. $$\text{Apdex}_T = \frac{\text{Satisfied} + \frac{\text{Tolerating}}{2}}{\text{Total Samples}}$$ where satisfied requests are $\leq T$, tolerating are $> T$ and $\leq 4T$, and frustrated are $> 4T$.

  13. What is the range of an Apdex score and what does 1 mean?

    Apdex ranges from $0$ to $1$. A score of $1$ means every request was 'satisfied' (all within the target threshold $T$); $0$ means every user was frustrated.

  14. Name three telemetry types (the 'pillars of observability') that platforms like New Relic collect.

    Metrics, Logs, and Traces (often summarized as MELT: Metrics, Events, Logs, Traces). Together they give a full view of system behavior and performance.

  15. What is Prometheus, and what monitoring model does it use?

    Prometheus is an open-source (CNCF) monitoring and alerting toolkit that stores time-series metrics. It uses a pull-based model: the Prometheus server scrapes metrics over HTTP from instrumented targets/exporters at defined intervals.

  16. What query language does Prometheus use, and what is it for?

    PromQL (Prometheus Query Language). It is a functional language for selecting, aggregating, and computing over time-series data to produce graphs, tables, and alerting rules.

  17. Name the four core Prometheus metric types.

    Counter (monotonically increasing), Gauge (can go up or down), Histogram (bucketed observations with counts), and Summary (client-side quantiles). Counters and gauges are scalar; histograms and summaries track distributions.

  18. In PromQL, what does the rate() function compute over a counter, e.g. $\text{rate}(http\_requests\_total[5m])$?

    It computes the per-second average rate of increase of the counter over the specified time window (here 5 minutes), automatically handling counter resets. It answers 'how many requests per second on average.'

  19. What is a Prometheus 'exporter'?

    An exporter is a component that exposes metrics from a third-party system (e.g., databases, hardware, OS) in Prometheus format on an HTTP endpoint so the Prometheus server can scrape them. Example: node_exporter for host metrics.

  20. What component handles alert routing/notification in the Prometheus ecosystem?

    Alertmanager. Prometheus evaluates alerting rules and fires alerts to Alertmanager, which deduplicates, groups, silences, and routes notifications to receivers like email, Slack, or PagerDuty.

  21. What is Grafana, and what is its primary role?

    Grafana is an open-source analytics and visualization platform. It connects to data sources (like Prometheus, Loki, InfluxDB, SQL databases) and renders interactive dashboards, graphs, and alerts. Its main role is visualization, not storage.

  22. How do Prometheus and Grafana typically work together?

    Prometheus collects and stores time-series metrics and is added as a data source in Grafana. Grafana queries Prometheus (via PromQL) to build dashboards and visualizations. Prometheus = collection/storage; Grafana = visualization/dashboards.

  23. Given a service with throughput 500 requests/second and average concurrency (requests in system) of 50, use Little's Law to find the average response time.

    Little's Law: $L = \lambda W$, so $W = \frac{L}{\lambda}$. $$W = \frac{50}{500} = 0.1\ \text{s} = 100\ \text{ms}$$

  24. State Amdahl's Law for speedup and explain what it bounds.

    $$S = \frac{1}{(1 - p) + \frac{p}{s}}$$ where $p$ is the parallelizable/optimizable fraction and $s$ its speedup. It bounds overall speedup: even as $s \to \infty$, $S \to \frac{1}{1-p}$, so the serial fraction limits total performance gains.

What this deck covers

The Performance Optimization deck follows the Back-end Web Developement Performance Optimization syllabus — 3 chapters and 9 topics — so questions land on material that is genuinely examinable rather than trivia around it. That works out to roughly 17.0 cards per chapter.

Answers are written to be recallable, not just readable — averaging about 208 characters, which is long enough to carry the reasoning and short enough to say out loud.

A deck like this earns its keep on the second and third pass. Read the syllabus first so you know the shape of the subject, then use the cards to find the specific facts that have not stuck.

Performance Optimization flashcards FAQ

How many Performance Optimization flashcards are in this Back-end Web Developement deck?

51 cards. This page previews 24 of them, sampled evenly across the deck so you can judge the difficulty before installing anything.

Are these Back-end Web Developement flashcards free?

Yes. The preview here is free to read with no signup, and the full 51-card deck is free inside the Examius app.

What do the Performance Optimization cards cover?

They follow the Back-end Web Developement Performance Optimization syllabus — 3 chapters and 9 topics — so the questions track what is actually examinable.

How should I use these flashcards?

Read the syllabus first so you know the shape of the subject, then drill the deck. Examius schedules each card with spaced repetition, so cards you keep missing come back sooner and ones you know drift further apart.