This message was deleted.
# community-help
s
This message was deleted.
l
I noticed IP addresses behind the nodes changed. We believe the health flickering issue was caused by DNS propagation. But why would the nodes be rescheduled? Especially when the LB worked before the nodes being destroyed?
j
@Luka Boulagnon When enabling HA, we provision two additional nodes and then also replace the old single node. So DNS changes across the board, including the load-balanced endpoint. The flickering you saw was most likely due to DNS caching on your OS and potentially on the Typesense Cloud web servers temporarily... Let me know if you're still seeing issues
l
@Jason Bosco Thank you very much for your answer. To be more precise: we already had HA enabled since we created the cluster (january 2022). Yesterday, we only enabled the checkbox about the loadbalancer on our cluster (we did it when we realized the cluster already had an API responding on the URL of the loadbalancer, even though the loadbalancer option on our dashboard was disabled at first). Then, after we enabled the loadbalancer option, TypeSense Cloud scheduler restarted all 3 nodes, modifying their IP addresses, and causing downtime in production due to DNS propagation. We’d like to understand two things: • why the nodes has been restarted after we enabled the loadbalancing? • how to ensure 0 downtime when nodes are recreated and TypeSense has to update DNS? would, at some point, the loadbalancer has to change its DNS? More generally, if there is documentation you could point me to so I can have deeper understanding of those topics, that would be awesome!
Furthermore, do we know if the LoadBalancer DNS entry might change at some point? (Causing potential downtime for the same reason we had the downtime yesterday)
j
Ah I see...
why the nodes has been restarted after we enabled the loadbalancing?
This is because we provision new infrastructure on our side when load balancing is enabled, or when any config changes are done.
how to ensure 0 downtime when nodes are recreated and TypeSense has to update DNS? would, at some point, the loadbalancer has to change its DNS?
The load-balanced endpoint will have multiple IPs returned in the DNS response, so even if one IP is down or stale or cached, the other IPs will continue servicing traffic. Then within 30s, the stale IP will be removed from DNS. This process is automatic and you shouldn't have to do anything for this.
do we know if the LoadBalancer DNS entry might change at some point?
Yes, it will change IPs anytime there is a configuration change or node rotation. Could you share the client configuration you're using to send search requests?
l
Hello, It makes sense now! It has been, at least, our second incident caused by DNS modifications. I don’t know if we got a misconfiguration though.
Then within 30s, the stale IP will be removed from DNS. This process is automatic and you shouldn't have to do anything for this.
Specifically, our issue was caused to DNS propagation delays. And the flickering states of the TS nodes was due to DNS not being fully propagated when we tested.
Could you share the client configuration you're using to send search requests?
You’ll find our infrastructure schema below. TS Client connects to 1 domain, which reaches our proxy, which then forwards the request to the (newly created) TSCloud LoadBalancer. For some specific reason, we cannot directly expose our TypeSense cluster to the TypeSense SDK. (For the context: as we use TypeSense on the web, we weren’t able to get the browser to TSCloud domains, so we had to proxy it behind one of our domains.) What is the best way you’d suggest in order to leverage DNS propagation issues caused by the modification of the DNS entries matching our cluster? Thank you again for your assistance! 🙂
j
For the context: as we use TypeSense on the web, we weren’t able to get the browser to TSCloud domains, so we had to proxy it behind one of our domains
Could you elaborate on this? The load balanced endpoint that you see in the Typesense dashboard can indeed be exposed to the web directly... if you configure your client library like this: https://typesense.org/docs/guide/high-availability.html#when-using-typesense-cloud-or-a-load-balancer Unless you have additional features in HA Proxy that you require, you shouldn't need to put HAProxy in front of Typesense
l
Sorry, I realize I wasn’t exhaustive on that point. Due to one of our client policy, working by whitelist, they only allow the use of our main domain. We use a reverse proxy (HA Proxy) accessible behind one of our subdomains, in front of TypeSense, to address this security constraint. EDIT: ultimately, if that could be an easy fix of all those issues, we could consider removing it with extra work. But, as the issue there is DNS propagation latency, I believe our reverse proxy helps more than it causes harm in this case.
@Jason Bosco Hello! By any chance, did you have time to check on my message? Do you have any documentation or recommendation regarding how to tackle the issue of DNS propagation when the cluster is updated?
j
But, as the issue there is DNS propagation latency, I believe our reverse proxy helps more than it causes harm in this case.
True. One thing you could do is setup 4 different sub-domains routing to each of the 4 hostnames Typesense gives you in an HA cluster, independently:
Copy code
search-ha.yourdomain.com -> xxx.a1.typesense.net
search-1.yourdomain.com -> xxx-1.a1.typesense.net
search-2.yourdomain.com -> xxx-2.a1.typesense.net
search-3.yourdomain.com -> xxx-3.a1.typesense.net
So it's a clean-passthrough and even if DNS propagation take a bit of time on one hostname, the other two hostnames will continue servicing traffic
Then in your client-configuration you want to set (pseudocode)
nearestNode: {search-ha.yourdomain.com}
nodes: [ {search-1.yourdomain.com}, {search-2.yourdomain.com}, {search-3.yourdomain.com} ]