Add proxy concurrency post: ATS, HAProxy, Envoy architecture#38
Merged
singhsanjay12 merged 16 commits intomainfrom Mar 10, 2026
Merged
Add proxy concurrency post: ATS, HAProxy, Envoy architecture#38singhsanjay12 merged 16 commits intomainfrom
singhsanjay12 merged 16 commits intomainfrom
Conversation
New post covering how reverse proxies handle concurrent connections at scale: the thin layer constraint, event loop model, and the concurrency architecture of Apache Traffic Server (continuation system), HAProxy (single-process nbthread), and Envoy (thread-per-core isolation). Includes 5 SVG diagrams: hero, thread-models comparison, ATS event thread architecture, HAProxy process model, and Envoy worker isolation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- thread-models.svg: bold VS divider, proper arrow markers, larger event loop box with arc icon centered, clean fan-in lines from connection dots - ats-arch.svg: bezier dispatch curves with arrowheads, compact ET_NET column with arc icons, continuation model panel with plugin warning - haproxy-arch.svg: fixed epoll arc+arrowhead icons, SO_REUSEPORT dispatch arrows, hot-reload callout, shared-state annotation inside process box - envoy-arch.svg: 2×2 worker grid with isolated badges, bold NO SHARED STATE barriers with pill labels, xDS arrows from control plane box - hero.svg: column separators, arrow markers, load bars on backends, arc loop icon and ~10K badge in proxy box Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Always verify singhsanjay12 is the active gh account before creating PRs — ssingh1_LinkedIn (Enterprise Managed User) cannot create PRs on this repo. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ribute Duplicate XML attributes are invalid and prevent SVG parsing entirely. Merged into a single font-family value. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
tests/svg_test.rb: new test_no_duplicate_attributes scans every opening tag for repeated attribute names — the class of bug that silently broke haproxy-arch.svg and envoy-arch.svg (two font-family= on one element). envoy-arch.svg: same copy-paste duplicate font-family= fixed, caught immediately by the new test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds {: file="haproxy.cfg" } and nginx syntax highlighting to the
configuration snippet so it renders as a named code box in the theme.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The blog disables Rouge (syntax_highlighter: disable: true), so Chirpy's
{: file="..." } IAL and language specifiers do not produce styled output —
they only added broken attributes to <pre>. Replaced with a custom HTML
block: dark #1e293b background, file icon + label header, monospace code,
and greyed-out inline comments. Renders correctly regardless of theme processing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two Python examples illustrate the concurrency model contrast: - Thread model: recv() blocks the OS thread; 10k clients = 10k threads - Event loop: await yields control; one thread serves thousands Both use the same dark HTML code box as the HAProxy config snippet, with keywords, literals, and comments lightly syntax-coloured. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three issues fixed: - Dispatch arrows to W2 and W3 were passing through W0 and W1 boxes. W2 arrow now routes above the grid (y=16), W3 routes below (y=320), so both arc cleanly around the outside without crossing any box. - Horizontal NO SHARED STATE barrier was at y=162, inside W0/W2 (which end at y=165). Moved W1/W3 down to y=175, creating a proper 10px gap; barrier now sits at y=170 between the rows. - xDS second arrow was a raw diagonal line. Replaced both xDS arrows with smooth curves routing from xDS box bottom to each worker's right-centre edge. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the 2×2 grid with a vertical stack of 4 workers so dispatch arrows can fan out cleanly from the listener through a dedicated 76-px lane (x=254–328) without any crossing. Key changes: - Workers now stacked vertically (W0–W3, each 190×62 px, 16-px gaps) - Listener Thread centred vertically alongside the worker column (y=167) - Dispatch S-curves all confined to x=254–328, control points at x=292 - xDS arrows confined to x=520–580, control points at x=555 - Three horizontal NO SHARED STATE barriers (y=90, 168, 246); centre barrier is labelled with the red pill - All text baselines ≤385 px (within viewBox bounds); passes SVG tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Link section headers to official docs: Apache Traffic Server, HAProxy, Envoy - Link body terms: Apache HTTPd, C10K problem, epoll, kqueue, TSAPI plugin interface, libevent, xDS protocol, Istio - Add HAProxy User Spotlight talk at the bottom: Modernizing LinkedIn's Traffic Stack Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two issues fixed: 1. Arc loop icon inside the event loop box was r=16 (~50px wide), whose right side extended into the text label zone. Text like "socket becomes readable" (centred at x=635, left edge ~x=574) overlapped the arc polygon (x≤579). Fix: shrink arc to r=10, reposition to top-left corner (x≈548-569, y≈118-133), shift all box text and badge from centre x=635 to x=648, giving ≥15 px clearance. 2. "idle" label (x=455, y=173, light-grey fill) sat directly on a fan-in line that passes through (455, ~175) in the same grey tone, making the label invisible. Fix: add opaque white background rect and darken label fill from #94a3b8 to #64748b. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- thread-models.svg: move '⋯ thousands' label above the green
annotation box (y=303→289) so it is not covered
- hero.svg: right-align backend load labels ('3 req', '5 req', 'idle')
at x=775 with text-anchor=end so they don't bleed into the box border
- ats-arch.svg: expand ET_NET 2 box height 52→64 and split the long
sublabel into two lines; reposition arc icon and dispatch arrow to
match the new box centre
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
test_em_dash_count_in_post_sources caps em dashes at 3; the post had 32. Replaced all prose em dashes with colons, semicolons, commas, or parentheses as appropriate. Also updated code-label spans and inline code comments (thread-per-connection · Python, yields; other ...). Front-matter description is exempt from the check so its em dash is left as-is. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Move conn dots from cy=192 to cy=206 so they sit on a distinct row below the title instead of overlapping 'ET_NET 2 ⚠ overloaded' - Shift sublabel text down (y=210/223 → y=219/231) to match the new row spacing in the taller 64px box - Fix orange annotation line: extend from x=557→555 (box right edge) and x=578→580 (callout box left edge) to eliminate the floating gap - Add indigo pill background behind 'round-robin' label so it reads clearly over the crossing dispatch curves Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing Done
ruby tests/svg_test.rb— 8 runs, 965 assertions, 0 failures