<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:media="http://search.yahoo.com/mrss/"

	>
<channel>
	<title>
	Comments on: Swift sucks at web serving… or does it?	</title>
	<atom:link href="https://wadetregaskis.com/swift-sucks-at-web-serving-or-does-it/feed/" rel="self" type="application/rss+xml" />
	<link>https://wadetregaskis.com/swift-sucks-at-web-serving-or-does-it/</link>
	<description></description>
	<lastBuildDate>Sat, 10 Aug 2024 18:04:03 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Hcker		</title>
		<link>https://wadetregaskis.com/swift-sucks-at-web-serving-or-does-it/#comment-4113</link>

		<dc:creator><![CDATA[Hcker]]></dc:creator>
		<pubDate>Sat, 10 Aug 2024 18:04:03 +0000</pubDate>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8061#comment-4113</guid>

					<description><![CDATA[It seems my first comment was not posted :)
Let me try one more time.

I think even 3rd version of the post has no sense..

Shortly speaking, there is no way to process 8k concurrent connections with &#060;50 Mb and with 95% success rate (something wrong. Maybe graphs were not updated properly?)

If you check popular projects like TechEmpower and the-benchmarker/web-framework in the GitHub - Vapor is not the best even in Swift category, and not comparable to Java frameworks (in terms of RPS and Latency). Not mentioning Go and Rust solutions
And as I assume Memory analysis is just showing wrong numbers.. for all languages.

Run 8k concurrent connections is heavy operation for CPU. And wrk and the server could start fight for resources. So also consider to use 2 machines for testing: one with benchmark tool and another one with the server

And I think there is no reason to use exactly wrk.. Rewrk, bombardier, goose, oha and many others.]]></description>
			<content:encoded><![CDATA[<p>It seems my first comment was not posted :)<br />
Let me try one more time.</p>
<p>I think even 3rd version of the post has no sense..</p>
<p>Shortly speaking, there is no way to process 8k concurrent connections with &lt;50 Mb and with 95% success rate (something wrong. Maybe graphs were not updated properly?)</p>
<p>If you check popular projects like TechEmpower and the-benchmarker/web-framework in the GitHub &#8211; Vapor is not the best even in Swift category, and not comparable to Java frameworks (in terms of RPS and Latency). Not mentioning Go and Rust solutions<br />
And as I assume Memory analysis is just showing wrong numbers.. for all languages.</p>
<p>Run 8k concurrent connections is heavy operation for CPU. And wrk and the server could start fight for resources. So also consider to use 2 machines for testing: one with benchmark tool and another one with the server</p>
<p>And I think there is no reason to use exactly wrk.. Rewrk, bombardier, goose, oha and many others.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Hcker		</title>
		<link>https://wadetregaskis.com/swift-sucks-at-web-serving-or-does-it/#comment-4112</link>

		<dc:creator><![CDATA[Hcker]]></dc:creator>
		<pubDate>Sat, 10 Aug 2024 17:55:41 +0000</pubDate>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8061#comment-4112</guid>

					<description><![CDATA[Oh after another look at the memory graph - I just think the whole graph is wrong. Slight changes only for Node.js (probably just some std in the measurements). Having no difference in memory to handle 32 concurrent connections and 9k has no sense for any language and framework.]]></description>
			<content:encoded><![CDATA[<p>Oh after another look at the memory graph &#8211; I just think the whole graph is wrong. Slight changes only for Node.js (probably just some std in the measurements). Having no difference in memory to handle 32 concurrent connections and 9k has no sense for any language and framework.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Hcker		</title>
		<link>https://wadetregaskis.com/swift-sucks-at-web-serving-or-does-it/#comment-4111</link>

		<dc:creator><![CDATA[Hcker]]></dc:creator>
		<pubDate>Sat, 10 Aug 2024 17:42:53 +0000</pubDate>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8061#comment-4111</guid>

					<description><![CDATA[I can&#039;t find meaningful results yet.
Even the 3rd version of the post doesn&#039;t make any sense..

1) There is no way to process 8k concurrent connections without **any** growth in memory - still something wrong. I don&#039;t know where - in wrk, in script that reading memory usage.. somewhere

2) How Vapor could be close to the RPS and Latency of Helidon?
If the code (provided by the Core Vapor developer) here is wrong, and Vapor could do much better - please make a PR:
https://web-frameworks-benchmark.netlify.app/result?asc=0&#038;f=vapor-framework,helidon-se&#038;metric=totalRequestsPerS&#038;order_by=level512

In TechEmpower Vapor is even not the best in Swift... and even Java solutions are just way superior over there (not even mentioning Go and Rust)
https://www.techempower.com/benchmarks/#hw=ph&#038;test=plaintext&#038;section=data-r22&#038;l=v2qiv3-cn3

3) In the 3d post again we can see ~97% of succeeds for 8k concurrent connections? with &#060;50Mb or RAM with calculating Fib numbers? 
If it will be true - most of the high-load services already were on the way to rewrite their code base to Vapor :)
Which is obviously again - non realistic

4) Moreover even to send 8k concurrent connections requires a lot of CPU/RAM. If everything is running on single machine - wrk and server should start fighting for resources..
Consider to use 2 server configuration. One with benchmark tool and another with the server (connected by LAN).

5) There are plenty of options that could be used instead of &#034;original&#034; wrk.
Rewrk, bombardier and many others (https://github.com/denji/awesome-http-benchmark)]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t find meaningful results yet.<br />
Even the 3rd version of the post doesn&#8217;t make any sense..</p>
<p>1) There is no way to process 8k concurrent connections without **any** growth in memory &#8211; still something wrong. I don&#8217;t know where &#8211; in wrk, in script that reading memory usage.. somewhere</p>
<p>2) How Vapor could be close to the RPS and Latency of Helidon?<br />
If the code (provided by the Core Vapor developer) here is wrong, and Vapor could do much better &#8211; please make a PR:<br />
<a href="https://web-frameworks-benchmark.netlify.app/result?asc=0&#038;f=vapor-framework,helidon-se&#038;metric=totalRequestsPerS&#038;order_by=level512" rel="nofollow ugc external noopener" data-wpel-link="external" target="_blank">https://web-frameworks-benchmark.netlify.app/result?asc=0&#038;f=vapor-framework,helidon-se&#038;metric=totalRequestsPerS&#038;order_by=level512</a></p>
<p>In TechEmpower Vapor is even not the best in Swift&#8230; and even Java solutions are just way superior over there (not even mentioning Go and Rust)<br />
<a href="https://www.techempower.com/benchmarks/#hw=ph&#038;test=plaintext&#038;section=data-r22&#038;l=v2qiv3-cn3" rel="nofollow ugc external noopener" data-wpel-link="external" target="_blank">https://www.techempower.com/benchmarks/#hw=ph&#038;test=plaintext&#038;section=data-r22&#038;l=v2qiv3-cn3</a></p>
<p>3) In the 3d post again we can see ~97% of succeeds for 8k concurrent connections? with &lt;50Mb or RAM with calculating Fib numbers?<br />
If it will be true &#8211; most of the high-load services already were on the way to rewrite their code base to Vapor :)<br />
Which is obviously again &#8211; non realistic</p>
<p>4) Moreover even to send 8k concurrent connections requires a lot of CPU/RAM. If everything is running on single machine &#8211; wrk and server should start fighting for resources..<br />
Consider to use 2 server configuration. One with benchmark tool and another with the server (connected by LAN).</p>
<p>5) There are plenty of options that could be used instead of &quot;original&quot; wrk.<br />
Rewrk, bombardier and many others (<a href="https://github.com/denji/awesome-http-benchmark" rel="nofollow ugc external noopener" data-wpel-link="external" target="_blank">https://github.com/denji/awesome-http-benchmark</a>)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andropov		</title>
		<link>https://wadetregaskis.com/swift-sucks-at-web-serving-or-does-it/#comment-3964</link>

		<dc:creator><![CDATA[Andropov]]></dc:creator>
		<pubDate>Tue, 18 Jun 2024 09:27:34 +0000</pubDate>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8061#comment-3964</guid>

					<description><![CDATA[Awesome post and investigation! Couldn&#039;t leave without commenting. On top of the specific issue being discussed, the conclusions and take aways after every step are spot on, applicable to different debugging scenarios, and worth remembering. Wish everyone approached problems with this mindset. Thanks for taking the time to write everything up!]]></description>
			<content:encoded><![CDATA[<p>Awesome post and investigation! Couldn&#8217;t leave without commenting. On top of the specific issue being discussed, the conclusions and take aways after every step are spot on, applicable to different debugging scenarios, and worth remembering. Wish everyone approached problems with this mindset. Thanks for taking the time to write everything up!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Wade		</title>
		<link>https://mas.to/@wadiest/112457286954342595</link>

		<dc:creator><![CDATA[Wade]]></dc:creator>
		<pubDate>Fri, 17 May 2024 16:07:01 +0000</pubDate>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8061#comment-3836</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://mastodon.social/@pixelscience/112457262586990917&quot;&gt;Michael Critz&lt;/a&gt;.

&lt;p&gt;&lt;a href=&quot;https://mastodon.social/@pixelscience&quot; rel=&quot;nofollow ugc&quot;&gt;@pixelscience&lt;/a&gt; &lt;a href=&quot;https://wadetregaskis.com/@everything&quot; rel=&quot;ugc&quot;&gt;@everything&lt;/a&gt; Yeah, it was partly because it was such an interesting conversation and collaboration that I wanted to write about it.  That and that it had a happy ending (there’s plenty of similar “why is this code weird?” threads which alas never find closure).&lt;/p&gt;&lt;p&gt;There’s fairly often some great threads in the Swift Forums, like that.  Not always, of course, but I suppose that’s unavoidable with a public common.&lt;/p&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://mastodon.social/@pixelscience/112457262586990917" data-wpel-link="external" target="_blank" rel="external noopener">Michael Critz</a>.</p>
<p><a href="https://mastodon.social/@pixelscience" rel="nofollow ugc external noopener" data-wpel-link="external" target="_blank">@pixelscience</a> <a href="https://wadetregaskis.com/@everything" rel="ugc" data-wpel-link="internal">@everything</a> Yeah, it was partly because it was such an interesting conversation and collaboration that I wanted to write about it.  That and that it had a happy ending (there’s plenty of similar “why is this code weird?” threads which alas never find closure).</p>
<p>There’s fairly often some great threads in the Swift Forums, like that.  Not always, of course, but I suppose that’s unavoidable with a public common.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Michael Critz		</title>
		<link>https://mastodon.social/@pixelscience/112457262586990917</link>

		<dc:creator><![CDATA[Michael Critz]]></dc:creator>
		<pubDate>Fri, 17 May 2024 16:00:58 +0000</pubDate>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8061#comment-3835</guid>

					<description><![CDATA[&lt;p&gt;&lt;a href=&quot;https://wadetregaskis.com/@everything&quot; rel=&quot;ugc&quot;&gt;@everything&lt;/a&gt; I followed this in the Swift forum thread. What was striking is how collaborative and professional it was. &lt;/p&gt;&lt;p&gt;Maybe my experience in corporate life has made me jaded. It feels like this could have been a circular firing squad of blame and recriminations. Instead it was just curious people trying to be helpful.&lt;/p&gt;&lt;p&gt;That spirit in a community is a delightful positive force.&lt;/p&gt;]]></description>
			<content:encoded><![CDATA[<p><a href="https://wadetregaskis.com/@everything" rel="ugc" data-wpel-link="internal">@everything</a> I followed this in the Swift forum thread. What was striking is how collaborative and professional it was. </p>
<p>Maybe my experience in corporate life has made me jaded. It feels like this could have been a circular firing squad of blame and recriminations. Instead it was just curious people trying to be helpful.</p>
<p>That spirit in a community is a delightful positive force.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Wade Tregaskis		</title>
		<link>https://wadetregaskis.com/swift-sucks-at-web-serving-or-does-it/#comment-3832</link>

		<dc:creator><![CDATA[Wade Tregaskis]]></dc:creator>
		<pubDate>Fri, 17 May 2024 06:33:33 +0000</pubDate>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8061#comment-3832</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://wadetregaskis.com/swift-sucks-at-web-serving-or-does-it/#comment-3831&quot;&gt;Anonymous&lt;/a&gt;.

Maybe.  But that&#039;s not what the documentation suggests (the &lt;code&gt;listen&lt;/code&gt; man page):

&lt;pre&gt;If a connection request arrives with the queue full,
the client may receive an error with an indication of ECONNREFUSED.&lt;/pre&gt;

Granted it does say &quot;may&quot; which is ambiguous, but it&#039;s clear right from the name that &lt;code&gt;ECONNREFUSED&lt;/code&gt; is the intended and appropriate errno for that situation.  &lt;code&gt;EBADF&lt;/code&gt;, which is what is actually signalled in that situation currently, is completely wrong.

The &lt;code&gt;somaxconn&lt;/code&gt; limit results in the &lt;code&gt;ECONNRESET&lt;/code&gt;.  I&#039;m not sure why it manifests as a different code for what is surely the exact same pattern on the wire - presumably that RST packet signalling connection denial - but it also shows that somehow the recipient kernel can distinguish between those two cases.  It also knows what state the connection is in - i.e. the difference between connecting and connected - which should be enough to map to the appropriate error code, too.

(Possibly there&#039;s some race conditions in transmission retry situations, which might make it technically impossible to always deduce the correct errno to signal.  But that&#039;s a rare edge case which doesn&#039;t excuse the general case behaviour.)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://wadetregaskis.com/swift-sucks-at-web-serving-or-does-it/#comment-3831" data-wpel-link="internal">Anonymous</a>.</p>
<p>Maybe.  But that&#8217;s not what the documentation suggests (the <code>listen</code> man page):</p>
<pre>If a connection request arrives with the queue full,
the client may receive an error with an indication of ECONNREFUSED.</pre>
<p>Granted it does say &#8220;may&#8221; which is ambiguous, but it&#8217;s clear right from the name that <code>ECONNREFUSED</code> is the intended and appropriate errno for that situation.  <code>EBADF</code>, which is what is actually signalled in that situation currently, is completely wrong.</p>
<p>The <code>somaxconn</code> limit results in the <code>ECONNRESET</code>.  I&#8217;m not sure why it manifests as a different code for what is surely the exact same pattern on the wire &#8211; presumably that RST packet signalling connection denial &#8211; but it also shows that somehow the recipient kernel can distinguish between those two cases.  It also knows what state the connection is in &#8211; i.e. the difference between connecting and connected &#8211; which should be enough to map to the appropriate error code, too.</p>
<p>(Possibly there&#8217;s some race conditions in transmission retry situations, which might make it technically impossible to always deduce the correct errno to signal.  But that&#8217;s a rare edge case which doesn&#8217;t excuse the general case behaviour.)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anonymous		</title>
		<link>https://wadetregaskis.com/swift-sucks-at-web-serving-or-does-it/#comment-3831</link>

		<dc:creator><![CDATA[Anonymous]]></dc:creator>
		<pubDate>Fri, 17 May 2024 04:52:43 +0000</pubDate>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8061#comment-3831</guid>

					<description><![CDATA[By definition of TCP behavior, any time that there is no service listening on a port, the OS issues a TCP RST packet back to the client.  This is the way connection refused works.  There are, of course other reasons that RST is sent, but the ECONNRESET return instead of ECONNREFUSED is something that should be expected.]]></description>
			<content:encoded><![CDATA[<p>By definition of TCP behavior, any time that there is no service listening on a port, the OS issues a TCP RST packet back to the client.  This is the way connection refused works.  There are, of course other reasons that RST is sent, but the ECONNRESET return instead of ECONNREFUSED is something that should be expected.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Wade		</title>
		<link>https://mas.to/@wadiest/112451732539329483</link>

		<dc:creator><![CDATA[Wade]]></dc:creator>
		<pubDate>Thu, 16 May 2024 16:34:28 +0000</pubDate>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8061#comment-3828</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://mastodon.social/@finestructure/112450888022751391&quot;&gt;Sven A. Schmidt&lt;/a&gt;.

&lt;p&gt;&lt;a href=&quot;https://mastodon.social/@finestructure&quot; rel=&quot;nofollow ugc&quot;&gt;@finestructure&lt;/a&gt; &lt;a href=&quot;https://wadetregaskis.com/@everything&quot; rel=&quot;ugc&quot;&gt;@everything&lt;/a&gt; Yep, Axel hasn’t yet done a [hopefully] final re-run to get fully corrected results.  Though I don’t expect they’ll change much from his second post (it should just fix the success rate).  I believe he’s intending to do a third post, for those revised results.  I’ll update mine to link to it, when he does.&lt;/p&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://mastodon.social/@finestructure/112450888022751391" data-wpel-link="external" target="_blank" rel="external noopener">Sven A. Schmidt</a>.</p>
<p><a href="https://mastodon.social/@finestructure" rel="nofollow ugc external noopener" data-wpel-link="external" target="_blank">@finestructure</a> <a href="https://wadetregaskis.com/@everything" rel="ugc" data-wpel-link="internal">@everything</a> Yep, Axel hasn’t yet done a [hopefully] final re-run to get fully corrected results.  Though I don’t expect they’ll change much from his second post (it should just fix the success rate).  I believe he’s intending to do a third post, for those revised results.  I’ll update mine to link to it, when he does.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Wade Tregaskis		</title>
		<link>https://wadetregaskis.com/swift-sucks-at-web-serving-or-does-it/#comment-3827</link>

		<dc:creator><![CDATA[Wade Tregaskis]]></dc:creator>
		<pubDate>Thu, 16 May 2024 16:05:26 +0000</pubDate>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8061#comment-3827</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://wadetregaskis.com/swift-sucks-at-web-serving-or-does-it/#comment-3826&quot;&gt;Anonymous&lt;/a&gt;.

Gah!  I kept making that mistake when I was writing this, but I thought I&#039;d corrected all of them.  Obviously not.  Thanks for pointing this out, and sorry Axel!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://wadetregaskis.com/swift-sucks-at-web-serving-or-does-it/#comment-3826" data-wpel-link="internal">Anonymous</a>.</p>
<p>Gah!  I kept making that mistake when I was writing this, but I thought I&#8217;d corrected all of them.  Obviously not.  Thanks for pointing this out, and sorry Axel!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anonymous		</title>
		<link>https://wadetregaskis.com/swift-sucks-at-web-serving-or-does-it/#comment-3826</link>

		<dc:creator><![CDATA[Anonymous]]></dc:creator>
		<pubDate>Thu, 16 May 2024 14:15:56 +0000</pubDate>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8061#comment-3826</guid>

					<description><![CDATA[Alex wanted to see how a very simple web server performed in:

Name typo in first section]]></description>
			<content:encoded><![CDATA[<p>Alex wanted to see how a very simple web server performed in:</p>
<p>Name typo in first section</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sven A. Schmidt		</title>
		<link>https://mastodon.social/@finestructure/112450888022751391</link>

		<dc:creator><![CDATA[Sven A. Schmidt]]></dc:creator>
		<pubDate>Thu, 16 May 2024 12:59:44 +0000</pubDate>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8061#comment-3825</guid>

					<description><![CDATA[&lt;p&gt;&lt;a href=&quot;https://wadetregaskis.com/@everything&quot; rel=&quot;ugc&quot;&gt;@everything&lt;/a&gt; Nice write-up of this epic thread!&lt;/p&gt;&lt;p&gt;It would be nice to see the complete updated results somewhere for reference, especially since you’ve got the outdated ones so prominently in the introduction.&lt;/p&gt;&lt;p&gt;Could make for a nice side by side showing the difference!&lt;/p&gt;]]></description>
			<content:encoded><![CDATA[<p><a href="https://wadetregaskis.com/@everything" rel="ugc" data-wpel-link="internal">@everything</a> Nice write-up of this epic thread!</p>
<p>It would be nice to see the complete updated results somewhere for reference, especially since you’ve got the outdated ones so prominently in the introduction.</p>
<p>Could make for a nice side by side showing the difference!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Matt Massicotte		</title>
		<link>https://mastodon.social/@mattiem/112450368774410235</link>

		<dc:creator><![CDATA[Matt Massicotte]]></dc:creator>
		<pubDate>Thu, 16 May 2024 10:47:43 +0000</pubDate>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8061#comment-3822</guid>

					<description><![CDATA[&lt;p&gt;&lt;a href=&quot;https://wadetregaskis.com/@everything&quot; rel=&quot;ugc&quot;&gt;@everything&lt;/a&gt; Wow what a story!&lt;/p&gt;]]></description>
			<content:encoded><![CDATA[<p><a href="https://wadetregaskis.com/@everything" rel="ugc" data-wpel-link="internal">@everything</a> Wow what a story!</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
