喜欢 Netflix 么？你应该感谢 FreeBSD
Netflix FreeBSD
![](/data/attachment/album/201904/24/234946bnz9c2cjppk88n78.png)


Netflix 是世界上最受欢迎的流媒体服务之一。对，你已经知道了。但你可能不知道的是 Netflix 使用 [FreeBSD](https://www.freebsd.org/) 向你提供内容。


是的。Netflix 依靠 FreeBSD 来构建其内部内容交付网络（CDN）。


[CDN](https://www.cloudflare.com/learning/cdn/what-is-a-cdn/) 是一组位于世界各地的服务器。它主要用于向终端用户分发像图像和视频这样的“大文件”。


Netflix 没有选择商业 CDN 服务，而是建立了自己的内部 CDN，名为 [Open Connect](https://openconnect.netflix.com/en/)。


Open Connect 使用[自定义硬件](https://openconnect.netflix.com/en/hardware/)：Open Connect Appliance。你可以在下面的图片中看到它。它可以每秒处理 40Gb 的数据，存储容量为 248 TB。


![Netflix’s Open Connect Appliance runs FreeBSD](/data/attachment/album/201904/24/234950fqhjqlchckitsp8t.jpg)


Netflix 免费为合格的互联网服务提供商（ISP） 提供 Open Connect Appliance。通过这种方式，大量的 Netflix 流量得到了本地化，ISP 可以更高效地提供 Netflix 内容。


Open Connect Appliance 运行在 FreeBSD 操作系统上，并且[几乎完全运行开源软件](https://openconnect.netflix.com/en/software/)。


### Open Connect 使用最新版 FreeBSD


你或许会觉得 Netflix 会在这样一个关键基础设施上使用 FreeBSD 的稳定版本，但 Netflix 会跟踪 [FreeBSD 最新/当前版本](https://www.bsdnow.tv/tutorials/stable-current)。Netflix 表示，跟踪“最新版”可以让他们“保持前瞻性，专注于创新”。


以下是 Netflix 跟踪最新版 FreeBSD 的好处：


* 更快的功能迭代
* 更快地使用 FreeBSD 的新功能
* 更快的 bug 修复
* 实现协作
* 尽量减少合并冲突
* 摊销合并“成本”



> 
> 运行 FreeBSD “最新版” 可以让我们非常高效地向用户分发大量数据，同时保持高速的功能开发。
> 
> 
> Netflix
> 
> 
> 


请记得，甚至[谷歌也使用 Debian](https://itsfoss.com/goobuntu-glinux-google/) 测试版而不是 Debian 稳定版。也许这些企业更喜欢最先进的功能。


与谷歌一样，Netflix 也计划向上游提供代码。这应该有助于 FreeBSD 和其他基于 FreeBSD 的 BSD 发行版。


那么 Netflix 用 FreeBSD 实现了什么？以下是一些统计数据：



> 
> 使用 FreeBSD 和商业硬件，我们在 16 核 2.6 GHz CPU 上使用约 55％ 的 CPU，实现了 90 Gb/s 的 TLS 加密连接。
> 
> 
> Netflix
> 
> 
> 


如果你想了解更多关于 Netflix 和 FreeBSD 的信息，可以参考 [FOSDEM 的这个演示文稿](https://fosdem.org/2019/schedule/event/netflix_freebsd/attachments/slides/3103/export/events/attachments/netflix_freebsd/slides/3103/FOSDEM_2019_Netflix_and_FreeBSD.pdf)。你还可以在[这里](http://mirror.onet.pl/pub/mirrors/video.fosdem.org/2019/Janson/netflix_freebsd.webm)观看演示文稿的视频。


目前，大型企业主要依靠 Linux 来实现其服务器基础架构，但 Netflix 已经信任了 BSD。这对 BSD 社区来说是一件好事，因为如果像 Netflix 这样的行业领导者重视 BSD，那么其他人也可以跟上。你怎么看？




---


via: <https://itsfoss.com/netflix-freebsd-cdn/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
Netflix is one of the most popular streaming services in the world.

But you already know that. Don’t you?

What you probably did not know is that Netflix uses [FreeBSD](https://www.freebsd.org/) to deliver its content to you.

Yes, that’s right. Netflix relies on FreeBSD to build its in-house content delivery network (CDN).

A [CDN](https://www.cloudflare.com/learning/cdn/what-is-a-cdn/) is a

Instead of opting for a commercial CDN service, Netflix has built its own in-house CDN called [Open Connect](https://openconnect.netflix.com/en/).

Open Connect utilizes [custom hardware](https://openconnect.netflix.com/en/hardware/), Open Connect Appliance. You can see it in the image below. It can handle 40Gb/s data and has a storage capacity of 248TB.

![Netflix's Open Connect Appliance runs FreeBSD](https://itsfoss.com/content/images/wordpress/2019/02/netflix-open-connect-appliance.jpeg?fit=800%2C533&ssl=1)

Netflix provides Open Connect Appliance to qualifying Internet Service Providers (ISP) for free. This way, substantial Netflix traffic gets localized and the ISPs deliver the Netflix content more efficiently.

This Open Connect Appliance runs on FreeBSD operating system and [almost exclusively runs open source software](https://openconnect.netflix.com/en/software/).

## Open Connect uses FreeBSD “Head”

![Netflix uses FreeBSD for its CDN](https://itsfoss.com/content/images/wordpress/2019/02/netflix-freebsd-800x450.png)

You would expect Netflix to use a stable release of FreeBSD for such a critical infrastructure but Netflix tracks the [FreeBSD head/current version](https://www.bsdnow.tv/tutorials/stable-current). Netflix says that tracking “head” lets them “stay forward-looking and focused on innovation”.

Here are the benefits Netflix sees of tracking FreeBSD:

- Quicker feature iteration
- Quicker access to new FreeBSD features
- Quicker bug fixes
- Enables collaboration
- Minimizes merge conflicts
- Amortizes merge “cost”

Running FreeBSD “head” lets us deliver large amounts of data to our users very efficiently, while maintaining a high velocity of feature development.

Netflix

Remember, even [Google uses Debian](https://itsfoss.com/goobuntu-glinux-google/) testing instead of Debian stable. Perhaps these enterprises prefer the cutting edge features more than anything else.

Like Google, Netflix also plans to upstream any code they can. This should help FreeBSD and other BSD distributions based on FreeBSD.

So what does Netflix achieves with FreeBSD? Here are some quick stats:

Using FreeBSD and commodity parts, we achieve 90 Gb/s serving TLS-encrypted connections with ~55% CPU on a 16-core 2.6-GHz CPU.

Netflix

If you want to know more about Netflix and FreeBSD, you can refer to [this presentation from FOSDEM](https://fosdem.org/2019/schedule/event/netflix_freebsd/attachments/slides/3103/export/events/attachments/netflix_freebsd/slides/3103/FOSDEM_2019_Netflix_and_FreeBSD.pdf). You can also watch the video of the presentation [here](http://mirror.onet.pl/pub/mirrors/video.fosdem.org/2019/Janson/netflix_freebsd.webm).

These days big enterprises rely mostly on Linux for their server infrastructure but Netflix has put their trust in BSD. This is a good thing for BSD community because if an industry leader like Netflix throws its weight behind BSD, others could follow the lead. What do you think?