流量 101:数据包主要是流量
Slack handles billions of inbound network requests per day, all of which traverse through our edge network and ingress load balancing tiers. In this blog post, we’ll talk about how a request flows — from a Slack’s user perspective — across the vast ether of the network to reach AWS and then Slack’s internal services. Let’s dive in!
Slack 每天要处理数十亿个入站网络请求,所有这些请求都要经过我们的边缘网络和入口负载均衡层。在这篇博文中,我们将从 Slack 用户的角度来谈谈请求是如何通过庞大的以太网络到达AWS,然后到达 Slack 的内部服务的。让我们深入了解一下!
How packets flow
数据包如何流动
Our edge network consists of a set of globally-distributed edge regions or AWS datacenters that we call edge PoPs. These edge PoPs sit closer to our users to reduce latency, improve performance, and connect them back to Slack’s main region in the AWS us-east-1. This is the region where our storage and core services live, and we heavily invested in availability zone (AZ) resilience to overcome any issues on a given datacenter/AZ. See Slack Cellular Architecture for more information on how we configure our AWS instances.
我们的边缘网络由一组全球分布的边缘区域或 AWS 数据中心组成,我们称之为边缘PoP。这些边缘 PoP 离我们的用户更近,以减少延迟、提高性能,并将他们连接回位于AWS us-east-1 的 Slack 主区域。这是我们的存储和核心服务所在的区域,我们在可用区(AZ) 弹性方面进行了大量投资,以克服特定数据中心/AZ 上的任何问题。有关我们如何配置 AWS 实例的详细信息,请参阅Slack Cellular Architecture。
Requests to Slack can be broadly classified into two categories: websocket and non-websocket. The services running in the edge regions are called Edge Services and are responsible for handling incoming requests. We will look at both these types in detail in later sections but first let’s look at how packets flow to our edge PoPs from a client’s perspective (without going into too much detail on how DNS resolution works).
向 Slack 提出的请求大致可分为两类:websocket和非 websocket。在边缘区域运行的服务称为边缘服务,负责处理传入的请求。我们将在后面的章节中详细介绍这两种类型,但首先让我们从客户端的角度来看看数据包是如何流向我们的边缘 PoP 的(这里不详细介绍 DNS 解析是如何工作的)。

When a user launches the Slack client, it will make many DNS requests in the background to resolve slack.com, wss-primary.slack.com, slack-edge.com, and any other domains we use. If the DNS request is not resolved from the local cache, it will ge...