<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="384261" data-post-id="384261">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="bbangert" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bbangert/120/37143_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  bbangert
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yes, around 65k connections before you hit the ephemeral port limit. I build websocket and TCP proxy services, so tens of thousands is normal, hundreds of thousands, also not a big deal. That type of concurrency is no problem for the Beam on dedicated hardware with a few CPU cores and some memory and a rather appealing use-case for Elixir/Erlang in general. There’s been some nice blog posts on millions of connections with Phoenix.</p>
<p>Caddy (and Traefik) can consume a lot of CPU/memory when handling 30-50k persistent connections, on a smaller Digital Ocean VPS Traefik was using half the machine resources to do it. We had to remove it and have the service directly on the host with no reverse proxy in the path due to its resource usage and concurrent connection limitation.</p>
<p>My company is currently setting up our own version of a deployment system for our Elixir apps, so when I see projects like this I always hope that they take an approach that at least allows for the full capability of the Beam to shine without restrictions that reduce its utility for my use-case so maybe we won’t need our own custom system. <img src="https://forum.elixirforum.com/images/emoji/apple/sweat_smile.png?v=15" title=":sweat_smile:" class="emoji" alt=":sweat_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="384261" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/xamal-deploy-elixir-releases-to-bare-metal-servers-via-ssh/74398/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-384261" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="384261"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="384262" data-post-id="384262">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="egze" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/egze/120/13522_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  egze
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I can’t comment whether Xamal wants to solve it or not. But the way I see it - this solution is not for the kind of scale that you are talking about. But it is great for solo devs, small/medium companies. It is a nice way to have a solid hosting, without the complexity (my deployment setup is like 200-300 lines of bash). And it’s also a very flexible solution that you can add any other web server behind Caddy, it doesn’t care if it’s Elixir or not.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="384262" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/xamal-deploy-elixir-releases-to-bare-metal-servers-via-ssh/74398/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-384262" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="384262"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #22"></div>
  </section>
</div>
    <div class="postbit" id="384263" data-post-id="384263">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Dmk" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Dmk/120/40058_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Dmk
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This is correct. I am not using this for the scale <a class="mention" href="/u/bbangert" rel="nofollow">@bbangert</a> is talking about. So haven’t even thought of optimization along those lines.</p>
<p>But now that he has brought it up… it is interesting. If Xamal could maintain the same experience/functionality and improve in this aspect I’m all for it. I’m not very familiar with the performance/scale/internals of Caddy/etc or eBPF.</p>
<p>If we let Cloudflare say handle the TLS and just have the server connect with cloudflared (which is how I have my apps configured currently) - then the only thing Caddy is doing is routing. <a class="mention" href="/u/bbangert" rel="nofollow">@bbangert</a> would you mind educating me more on what your approach would look like/what your thoughts are?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="384263" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/xamal-deploy-elixir-releases-to-bare-metal-servers-via-ssh/74398/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-384263" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="384263"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #23"></div>
  </section>
</div>
    <div class="postbit" id="384493" data-post-id="384493">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="bbangert" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bbangert/120/37143_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  bbangert
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Sure <a class="mention" href="/u/dmk" rel="nofollow">@Dmk</a>, the approach that I was thinking would replace Caddy with a different eBPF service that just exposes an API similar to Caddy to control eBPF switching. A new app release would run the app on a new port, validate its health, then make the API call to the eBPF service to switch the routing to the new port.</p>
<p>Note that there’s limitations to this approach, as eBPF is at the Layer 2 level, it can just route packets. If a goal of using Caddy was to use its SNI so you could dispatch different domains to different apps, eBPF won’t work for that.</p>
<p>The benefit is that if you are using different IP’s and/or you’re fine terminating SSL because you are only running a single app on the VPS or bare metal, eBPF, especially with XDP (packet handling logic before it hits the linux kernel right at the NIC) isn’t going to be beat. Just microseconds of overhead vs. a dozen or more milliseconds with Caddy, and no extra RAM/CPU usage.</p>
<p>I think for many, using Caddy is likely fine, but the folks running large websocket/TCP services (or even DNS with say, erldns and such), the eBPF/XDP route is great. My company is already going this path, we just don’t have a great app deployment story right now. I’ll be happy to circle back with more concrete code and examples of the eBPF/XDP side when we have it running, as I still haven’t figured out the best way to build that eBPF service API (Honey Potion is a bit alpha).</p>
<p>Edit: My bad, looks like enough packet logic can run in eBPF to look at the SNI header and route appropriately.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="384493" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/xamal-deploy-elixir-releases-to-bare-metal-servers-via-ssh/74398/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-384493" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="384493"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #24"></div>
  </section>
</div>
    <div class="postbit" id="384495" data-post-id="384495">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Dmk" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Dmk/120/40058_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Dmk
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks for the info. I’ll have to do some more research into this (when time permits <img src="https://forum.elixirforum.com/images/emoji/apple/laughing.png?v=15" title=":laughing:" class="emoji" alt=":laughing:" loading="lazy" width="20" height="20">).</p>
<p>Also saw on X <a class="mention" href="/u/chrismccord" rel="nofollow">@chrismccord</a> post today <a href="https://x.com/chris_mccord/status/2029630330630508929" class="inline-onebox" rel="noopener nofollow ugc">Chris McCord on X: "The Erlang VM has all these incredible things. Did you know you can boot a `:peer` node as a VM within the VM, fully meshed? Enter `FlyDeploy.BlueGreen` - "hot bluegreen" deploys where we spin up the new incoming VM, then cutover seamlessly: before/after code changes: https://t.co/cUb4GAiVBI" / X</a> - which got my wheels turning.</p>
<p>Threw Claude at the problem (and this is outside of my wheelhouse, so all of this needs to be verified) - but came up with <a href="https://github.com/dmkenney/xamal/blob/master/docs/research/beam-peer-blue-green.md" class="inline-onebox" rel="noopener nofollow ugc">xamal/docs/research/beam-peer-blue-green.md at master · dmkenney/xamal · GitHub</a></p>
<p>I’ve got some homework!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="384495" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/xamal-deploy-elixir-releases-to-bare-metal-servers-via-ssh/74398/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-384495" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="384495"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #25"></div>
  </section>
</div>
    <div class="postbit" id="389935" data-post-id="389935">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Dmk" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Dmk/120/40058_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Dmk
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><strong>Update</strong>: Xamal is now Mix-first (no more stand-alone CLI)</p>
<p>Big one. <span class="mention">@dannote</span> (Danila Poyarkov) put together a substantial PR that reworked Xamal from a standalone escript CLI into idiomatic Mix tasks. <code>mix xamal.*</code> is now the command surface, config moved from YAML/EEx to native Elixir config, and there’s an explicit <code>Xamal.Context{}</code> passed through instead of process-global state. It fits a normal Elixir project much more naturally now.</p>
<p>Huge thanks Danila - I like this approach much better!</p>
<p>Since then (all in the last few hours) I’ve cleaned things up on top: 0.3.1 is on Hex with CI/release sorted, plus a handful of fixes ~ expansion in SSH key paths, interactive SSH sessions, and CLI flag parsing.</p>
<p><strong>Hex</strong>: <a href="https://hex.pm/packages/xamal" class="inline-onebox" rel="nofollow">xamal | Hex</a><br>
<strong>Repo</strong>: <a href="https://github.com/dmkenney/xamal" class="inline-onebox" rel="noopener nofollow ugc">GitHub - dmkenney/xamal: Deploy Elixir apps to bare metal servers. Like Kamal, but with native releases + Caddy instead of Docker. · GitHub</a><br>
<strong>PR</strong>: <a href="https://github.com/dmkenney/xamal/pull/4" class="inline-onebox" rel="noopener nofollow ugc">Make Xamal Mix-first and Elixir-config driven by dannote · Pull Request #4 · dmkenney/xamal · GitHub</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="389935" data-batch-url="/posts/batch_likers">
                        7
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/xamal-deploy-elixir-releases-to-bare-metal-servers-via-ssh/74398/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-389935" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="389935"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #26"></div>
  </section>
</div>
    <div class="postbit" id="389948" data-post-id="389948">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="matt-savvy" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  matt-savvy
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Looks cool, but how do we pronounce Xamal?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="389948" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/xamal-deploy-elixir-releases-to-bare-metal-servers-via-ssh/74398/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-389948" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="389948"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #27"></div>
  </section>
</div>
    <div class="postbit" id="389984" data-post-id="389984">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Dmk" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Dmk/120/40058_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Dmk
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Great question <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20"></p>
<p>zuh-MAHL</p>
<p>or however you want <img src="https://forum.elixirforum.com/images/emoji/apple/winking_face_with_tongue.png?v=15" title=":winking_face_with_tongue:" class="emoji" alt=":winking_face_with_tongue:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="389984" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/xamal-deploy-elixir-releases-to-bare-metal-servers-via-ssh/74398/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-389984" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="389984"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #28"></div>
  </section>
</div>
    <div class="postbit" id="390511" data-post-id="390511">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="abrookewood" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  abrookewood
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/dmk" rel="nofollow">@Dmk</a> are the applications running as Services under systemd?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="390511" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/xamal-deploy-elixir-releases-to-bare-metal-servers-via-ssh/74398/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-390511" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="390511"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #29"></div>
  </section>
</div>
    <div class="postbit" id="390537" data-post-id="390537">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Dmk" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Dmk/120/40058_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Dmk
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yes, that is correct.</p>
<p>Xamal puts a template unit at /etc/systemd/system/@.service and uses the port as the instance ID, so a running app is just myapp@4000. Blue-green is just two instances on different ports myapp@4000/myapp@4001) with Caddy swapping between them.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="390537" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/xamal-deploy-elixir-releases-to-bare-metal-servers-via-ssh/74398/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-390537" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="390537"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #30"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/74398/load_more?page=4">Load more posts (4 remaining)</a>
</div></template></turbo-stream>