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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="te_chris" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/te_chris/120/6142_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  te_chris
                    <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>I haven’t used it yet, but we’re using GCP GKE, and our main ingress is a cloud loadbalancer which exposes a single IPv4 address and can, theoretically, do global load balancing. <a href="https://cloud.google.com/load-balancing/docs/load-balancing-overview" class="inline-onebox" rel="noopener nofollow ugc">Cloud Load Balancing overview &nbsp;|&nbsp; Google Cloud Documentation</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="196689" 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/scaling-liveview-for-low-latency-in-multiple-regions/35496/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-196689" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="196689"
                     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="196743" data-post-id="196743">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="te_chris" data-post="22" data-topic="35496">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/te_chris/48/6142_2.png" class="avatar"> te_chris:</div>
<blockquote>
<p>main ingress is a cloud loadbalancer which exposes a single IPv4 address and can, theoretically, do global load balancing</p>
</blockquote>
</aside>
<p>It can do global load balancing AND you can have instances across the globe on the same virtual network so you can actually run a normal global distributed beam setup. Then just do some smart ETS caching and you’re good.</p>
<p>Not sure how the beam would handle latencies in practice. I’ve read of issues there but it would be simple enough to try. Just keep an eye on your egress bill <img src="https://forum.elixirforum.com/images/emoji/apple/grimacing.png?v=15" title=":grimacing:" class="emoji" alt=":grimacing:" 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="196743" 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/scaling-liveview-for-low-latency-in-multiple-regions/35496/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-196743" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="196743"
                     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="196744" data-post-id="196744">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>And then you don’t need a fancy database just use Cloud SQLs read replication.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="196744" 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/scaling-liveview-for-low-latency-in-multiple-regions/35496/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-196744" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="196744"
                     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="196777" data-post-id="196777">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="te_chris" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/te_chris/120/6142_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  te_chris
                    <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>Yeah that’s what I’m thinking when it comes to it: audit of our LV usage to cut down any unnecessary interaction, then multi-region GKE cluster with read replicas in each region and see how it works. We’re currently using discrete horizontal scaling without experiencing any real drawbacks - i.e. no distributed BEAM - so it might just work. When I get some time (hah) I might spin up a multi-region cluster and run some latency tests etc.</p>
<p>TBH this is why I went with GCP: as well as a better Kube product, their networking is really good.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="196777" 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/scaling-liveview-for-low-latency-in-multiple-regions/35496/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-196777" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="196777"
                     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="196814" data-post-id="196814">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I had been meaning to test this … and I am glad to confirm that it works!</p>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/8/d/8d0bc934b2a07fa1bc84d36d658909a7bbf0c18e.jpeg" data-download-href="https://forum.elixirforum.com/uploads/default/8d0bc934b2a07fa1bc84d36d658909a7bbf0c18e" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/optimized/3X/8/d/8d0bc934b2a07fa1bc84d36d658909a7bbf0c18e_2_690x315.jpeg" alt="image" data-base62-sha1="k7KzCU4ajRJfOJHKZm6zS9ucTlY" width="690" height="315" srcset="https://forum.elixirforum.com/uploads/default/optimized/3X/8/d/8d0bc934b2a07fa1bc84d36d658909a7bbf0c18e_2_690x315.jpeg, https://forum.elixirforum.com/uploads/default/optimized/3X/8/d/8d0bc934b2a07fa1bc84d36d658909a7bbf0c18e_2_1035x472.jpeg 1.5x, https://forum.elixirforum.com/uploads/default/optimized/3X/8/d/8d0bc934b2a07fa1bc84d36d658909a7bbf0c18e_2_1380x630.jpeg 2x" data-dominant-color="455A4A"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">2538×1162 153 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<p>The process which pulls these log messages on page load starts a task on each node to get the recent log events cache, combines and returns them.</p>
<p>The Germany node is not serving traffic yet. All nodes are talking to the Postgres hosted in the US. We do a bunch of queries on node boot and did get some Ecto timeouts there so I’m not sure we’ll be able to serve traffic until we get a replica over there too.</p>
<p>But with Google Global load balancer all EU traffic should go directly to this node, and all US traffic will go to the US nodes. And when you load the page up it collects data from all nodes globally and displays that data.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="196814" data-batch-url="/posts/batch_likers">
                        3
                      </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/scaling-liveview-for-low-latency-in-multiple-regions/35496/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-196814" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="196814"
                     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="201205" data-post-id="201205">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Did you get the database replicating ok, this would make an interesting blog post. Are all writes being sent to the US and just reads in the EU?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="201205" 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/scaling-liveview-for-low-latency-in-multiple-regions/35496/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-201205" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="201205"
                     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="201219" data-post-id="201219">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Not yet. I pulled that node down as we’re replicating our rate limiting data via PubSub to each node and the data transfer was a bit much.</p>
<p>Hopefully week after next we’ll roll out more precise caching which will let us just run one db node. And then each continent will be a separate cluster to avoid the PubSub transfer costs. Rate limits will be per cluster. Global load balancing will still be sending data per each request to the closest Logflare cluster which will be great for our EU users.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="201219" 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/scaling-liveview-for-low-latency-in-multiple-regions/35496/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-201219" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="201219"
                     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="362011" data-post-id="362011">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>The limiting factor in those situations is always the state. Specifically, the persistent storage.</p>
<p>If you can build up your state at the edge and sync it across the regions - then you’re golden.</p>
<p>A specific solution depends on the application’s nature but something like Turso and ElectricSQL might be involved.</p>
<p>I wanted to experiment with EventStoreDB (aka Kurrent) and LiteFS abut didn’t get to do that</p>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/d/1/d187d2f8f1c005c84e60c583948ca844f344b012.jpeg" data-download-href="https://forum.elixirforum.com/uploads/default/d187d2f8f1c005c84e60c583948ca844f344b012" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/d/1/d187d2f8f1c005c84e60c583948ca844f344b012.jpeg" alt="image" data-base62-sha1="tTANaPpNMYBjws4C6ZLeKx9XKhA" width="690" height="377" data-dominant-color="CCDDEB"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1200×656 39.4 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="362011" 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/scaling-liveview-for-low-latency-in-multiple-regions/35496/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-362011" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="362011"
                     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>