Skip to content

Conversation

@sleipnir
Copy link
Collaborator

@sleipnir sleipnir commented Dec 8, 2025

Hi everyone, I'd like to talk a little about what I'm currently working on here.

I'm almost finished implementing a new server-side adapter entirely based on Elixir using the thousand_island library. And the results are promising, as we can see below.

Performance Metrics

Metric Cowboy ThousandIsland Improvement
Requests Processed 1,475 3,115 +111% (2.11x)
Total Time 1.46s 0.86s -41% (1.71x faster)
Throughput ~1,008 req/s ~3,637 req/s +261%
Minimum Latency 618µs 177µs -71% (3.5x faster)
Maximum Latency 89.1ms 39.6ms -56% (2.25x faster)
Average Latency ~991µs ~274µs -72% (3.6x faster)
CPU Time (User) 3.12s 1.72s -45%
CPU Time (System) 0.50s 0.48s -4%

Analysis

Advantages of ThousandIsland:

  • Dramatically higher throughput:
    Processed more than double the number of requests in the same test period.
  • Significantly lower latencies:
    • Minimum latency 3.5x lower
    • Maximum latency 2.25x lower
    • Average latency approximately 3.6x lower
  • CPU efficiency:
    Used 45% less CPU time (user time).
  • Reduced total execution time:
    Completed the tests in almost half the time

The ThousandIsland adapter demonstrates substantially superior performance compared to Cowboy across all measured aspects. The implementation delivers:

  • Better throughput (~3.6x)
  • Lower latencies (3–4x)
  • Better resource efficiency

This is still a draft and needs a lot of refinement. I opened the PR just to document the work and share it with everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants