Slackbot
11/08/2023, 4:55 PMLuka Boulagnon
11/08/2023, 5:39 PMJason Bosco
11/09/2023, 12:49 AMLuka Boulagnon
11/09/2023, 8:09 AMLuka Boulagnon
11/09/2023, 8:53 AMJason Bosco
11/09/2023, 9:25 PMwhy 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?
Luka Boulagnon
11/10/2023, 8:54 AMThen 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! 🙂
Jason Bosco
11/10/2023, 3:35 PMFor 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 domainsCould 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
Luka Boulagnon
11/10/2023, 4:02 PMLuka Boulagnon
11/16/2023, 8:56 AMJason Bosco
11/16/2023, 6:14 PMBut, 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:
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 trafficJason Bosco
11/16/2023, 6:15 PMnearestNode: {search-ha.yourdomain.com}
nodes: [ {search-1.yourdomain.com}, {search-2.yourdomain.com}, {search-3.yourdomain.com} ]