This message was deleted.
# helpdesk
s
This message was deleted.
d
Hi Alexander, welcome! Where are your clients located at? Are they in the same geographic area or are they spread around the world? If it's spread across many locations, then I don't think you will be able to reduce latency by hosting yourself. With LiveKit, most of the communication are going between the client's machine and the SFU directly, without involving your backend servers. Cloud runs on a globally distributed mesh network so that each client is able to connect to the server that's closest to them.
w
Hi David! Thanks for this. Our users will be globally distributed, but our main focus is in the US market - so sounds best to use LiveKit cloud 👍 We currently generate our LiveKit tokens via an HTTP request from clients to our single backend which is hosted in a single server in NY - do you have any recommendations for how to speed up this process (e.g. deploy in multiple regions, socket instead of HTTP etc)?
d
Yeah, you can definitely deploy your token endpoint to multiple regions. Though it's not a big deal typically since it's only performed once. You could also use serverless functions that other cloud vendors provide, because they can typically distribute that function more widely. Another tip for speeding up the connection with LiveKit, you can call prepareConnection ahead of time. That'll warm up the SSL cache and also determine the closest data center to connect to with Cloud.
w
Thank you David! Do you have any example of how to use prepareConnection in Swift? 🙌
d
Ah, this isn't implemented on Swift yet, but will be soon 🙂
w
Ahh I see! Sounds good - would be great to have it in Swift 🙂
l
I'm also noticing that use_external_ip: false doesn't do what I would expect as mentioned in https://github.com/livekit/livekit/issues/2088 In my case, it would be great if there were an option in config.yaml to let you specify the external ip address.
d
@loud-table-1380 could you add to the issue? that would let our team know when they look to implement this one
🙌 1
l
So after a little digging, I got it to work by using node_ip in yaml instead of the --node-ip command liine flag. https://github.com/livekit/livekit/issues/2088#issuecomment-1749460330
🙌 1