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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I am using the bridge network mode, with the custom peerage provider for srv records.</p>
<pre><code> NAME                RESULT OF ATTEMPT
 api@172.31.13.73 true      
 api@172.31.6.233 false     

 LIVE NODES
 api@172.31.13.73 (self)
</code></pre>
<p>Not really sure why it won’t connect. Any help is appreciated.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="209930" 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/distributed-elixir-in-amazon-ecs/15106/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-209930" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="209930"
                     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 #11"></div>
  </section>
</div>
    <div class="postbit" id="281339" data-post-id="281339">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I struggled with this for a week and eventually got it working. The information in this thread is enough to point in the right direction, but there is a big gap between the right direction and a successful deployment.</p>
<p>I’ve written up a fresh guide on deploying distributed Elixir to ECS Fargate tasks with Service Discovery and libcluster’s DNS Polling strategy. Hope it helps save someone some time!</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://dmblake.com/elixir-clustering-with-libcluster-and-aws-ecs-fargate-in-cdk">
  <header class="source">
      <img src="https://dmblake.com/favicon.ico" class="site-icon" alt="" width="256" height="256">

      <a href="https://dmblake.com/elixir-clustering-with-libcluster-and-aws-ecs-fargate-in-cdk" target="_blank" rel="noopener nofollow ugc" title="12:42AM - 12 March 2023">Drewble Codes – 12 Mar 23</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/361;"><img src="https://dmblake.com/api/og/post?og=eyJhdXRob3IiOiJEcmV3JTIwQmxha2UiLCJpc0RlZmF1bHRNb2RlRGFyayI6ZmFsc2UsInJlYWRUaW1lIjo5LCJjb21tZW50cyI6MCwicmVhY3Rpb25zIjowLCJkb21haW4iOiJkbWJsYWtlLmNvbSIsInRpdGxlIjoiRWxpeGlyJTIwQ2x1c3RlcmluZyUyMHdpdGglMjBsaWJjbHVzdGVyJTIwYW5kJTIwQVdTJTIwRUNTJTIwRmFyZ2F0ZSUyMGluJTIwQ0RLIiwicGhvdG8iOiJodHRwczovL2Nkbi5oYXNobm9kZS5jb20vcmVzL2hhc2hub2RlL2ltYWdlL3VwbG9hZC92MTY2Nzc2NTE5NDA0OS84Zlp4ZXktRWEuanBlZyIsImxvZ28iOm51bGwsImZhdmljb24iOm51bGwsInB1Ymxpc2hlZEF0IjoiMjAyMy0wMy0xMlQwMDo0MjoyOC45MzNaIiwidXBkYXRlZEF0IjoiMjAyMy0wMy0xM1QwMjo0ODoyMC44MTNaIn0=" class="thumbnail" alt="" width="690" height="362"></div>

<h3><a href="https://dmblake.com/elixir-clustering-with-libcluster-and-aws-ecs-fargate-in-cdk" target="_blank" rel="noopener nofollow ugc">Elixir Clustering with libcluster and AWS ECS Fargate in CDK</a></h3>

  <p>A real-world step-by-step guide to deploying distributed Elixir nodes on AWS ECS Fargate tasks with libcluster and service discovery.</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="281339" data-batch-url="/posts/batch_likers">
                        5
                      </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/distributed-elixir-in-amazon-ecs/15106/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-281339" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="281339"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
    <div class="postbit" id="320293" data-post-id="320293">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks for this write-up. However, note that Route53 multi-value DNS will only ever return 8 records maximum. This limits the number of nodes in a cluster using this strategy to 8. Any more than that, and the results returned by the dns query will vary each time, causing libcluster to think nodes are coming and going, and you will see lots of disconnects/reconnects.</p>
<p>There is also a possible issue with the task IPs getting removed from the private namespace zone only after a task has transitioned to the STOPPED state (which seems like a major design flaw), not giving a task being shut down a chance to drain any pending requests and account for the A record TTL. I have not fully investigated this, however.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="320293" 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/distributed-elixir-in-amazon-ecs/15106/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-320293" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="320293"
                     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 #14"></div>
  </section>
</div>
    <div class="postbit" id="320447" data-post-id="320447">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>So after some investigation, it <em>does</em> look like the A records get removed immediately with the stop requests. It also appears that the application does not get a SIGTERM for quite a while after that – the container remains active all the way through to the end of the DEPROVISIONING state.</p>
<p>The limitation with the number of A records being limited to 8 stands, however. More than that and the cluster will experience lots of random disconnects and reconnects. It is possible that things may eventually stabilze (seems like it should in theory) – I am still looking at this.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="320447" 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/distributed-elixir-in-amazon-ecs/15106/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-320447" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="320447"
                     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 #15"></div>
  </section>
</div>
    <div class="postbit" id="334936" data-post-id="334936">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Does the same applies for Elastic Beanstalk with applications deployed using Docker?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="334936" 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/distributed-elixir-in-amazon-ecs/15106/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-334936" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="334936"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>