I’m wondering what part of a system routes a user to an appropriate data center. Take for example a user uploads a video on Facebook somewhere in Malaysia. I’m sure this would end up on a data server in Asia initially. But how does it get routed there? Is this a task done by a load balancer? And last, perhaps I’d the video gets shared enough by American users it might be replicated to servers in North America too. Any idea what this kind of routing is called? I would like to read more about this.
See if the geo replication section here https://code.fb.com/core-data/systems-scale-2018-recap/ helps. I have not watched it yet.
Now that I started watching the video, it does not seem to answer your question. Sorry :-)
We use this in my company.... its called geolocation in dns. If a user in india is trying to fetch a resource, based on geo-location policies in dns; it will only give public IP of the data-center in asia. I hope this answers your question :)
You can store files in S3, or place things in one of the CDN’s. In AWS Facebook for example is multi region multi zone. Ultimately it’s intelligent routing through things like Zuul. Load balancing, proxy, cache. Just remember eventual consistency. It doesn’t matter the video to be available immediately to everyone / unless it’s a live video- and if that’s the case you have the “thundering herd” problem, look it up. Eventual consistency is easier you’ll have background processes to make sure the other nodes gets updates. Cassandra it’s built in. Lastly you’ll have cache in America. That first retrieval from Asia might be a bit more expensive but it’s cached after that.
Was this asked in interview?
DNS. The company’s authoritative dns server resolves the query based on the location of your local dns server (using IP address)
Is the DNS part of the load balancer ? If not does the dns come before or after?
Load balancers dont come into play at this stage. Once you get an ip address for the appropriate data center, then you hit the various load balancers. There are usually multiple (entry point, mid tiers, db, etc etc)
Health & Wellness
Yesterday
5910
Why are women naked in gym?
2024 Presidential Election
Yesterday
1543
Biden ruined America and tech! Tax plans are insane
2024 Tax
Yesterday
2686
Biden’s new tax proposal is wild
Tech Industry
Yesterday
6781
Google doing more layoffs, restructuring including country moves
Tech Industry
2d
52005
Goog Employees Arrested
I believe it would be load balancer which assigns requests to closest locations. I recently read this super interesting article about netflix which you will find helpful. http://highscalability.com/blog/2017/12/11/netflix-what-happens-when-you-press-play.html