Skip to content
#Infrastructure

[3/7] Meta's Hyperscale Infrastructure: Overview and Insights (Category: Infrastructure)

#Infrastructure #PlatformEngineering #Architecture #DistributedSystems #SystemDesign #Engineering #Software #DevEx #DevOps

[3/7] Meta's Hyperscale Infrastructure: Overview and Insights (Rubric #Infrastructure)

In this post, we will continue to consider a cool article from the banned in Russia company Meta. (previous issues: 1 and 2). We will talk about the processing of user queries, which is designed end-to-end to achieve the desired level of quality. (latency, scalability, reliability, ...) and cost.

Global network and points of presence (PoP) To minimize delays, Meta dynamically directs user requests to its nearest node. When a user opens, for example, facebook.com, the DNS Meta returns the IP of the nearest point of presence. (PoP) A small edge of a data center that completes an incoming connection from the user and proxies traffic to the main regions of Meta data centers over pre-established long-lived connections n (within the WAN network). This reduces the connection time and balances the load between regions.

CDN and caching static content If the user query concerns static content, the answer can be given directly at the PoP level if it contains fresh cache. Meta also hosts cache servers within ISP networks when traffic is high.

Routing of dynamic queries If the request is not related to static content (It requires the generation of a response on the fly.)PoP redirects it to the internal Meta network. A special load balancer in the selected data center region receives the incoming stream and distributes requests to front-end servers. In Meta, the frontend is implemented as a scalable serverless layer: each user request is processed by a separate frontend function, which can call many backend services to compile a response. Here comes the second insight from the author of the article.

Insight 2 : Meta’s global infrastructure consists of CDN sites, edge datacenters, and main datacenters. Because of the high volume of our internal cross-datacenter traffic, we have built a private WAN to connect our datacenters, rather than relying on the public Internet.

Asynchronous processing and offline computing For tasks that are not critical to instantaneous response, asynchronous processing is widely used. Frontend functions can queue events that will be handled separately by special background functions without blocking the user’s response. Such event-driven functions run in parallel, their execution is optimized for bandwidth. (throughput)rather than delay (latency)It does not affect the response time of the main request. At the same time, everything that happens when processing requests generates huge amounts of data that are continuously dumped into the data store. (data warehouse). Further offline Meta systems use the accumulated data for batch and streaming calculations, which are then used by online services when processing new user requests. Here comes the third insight from the author of the article.

Insight 3 : Using a data warehouse as an intermediate layer to decouple online and offline processing simplifies the architecture and enables independent optimizations. This is a key principle of sustainability and efficiency at the hyperscale.

Topology and scale of infrastructure The scale of infrastructure is approximately as follows There are dozens of regions in the company, in each region there are many data centers, each of which has hundreds of thousands of servers. PoPs hundreds, each of them from hundreds to thousands of servers CDN site thousands, each of them typically dozens of servers, but sometimes there are hundreds

  • MSB (main switchboards) A power partitioning thing inside data centers, dozens of them in data centers, typically MSB serves tens of thousands of servers.

In next post We're going to talk about the approaches that make Meta engineers productive.

#Infrastructure #PlatformEngineering #Architecture #DistributedSystems #SystemDesign #Engineering #Software #DevEx #DevOps