![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
Cloudflare的传统是在4月1日推出真实产品,而不是今天在线流传的通常的笑话产品。
There's a tradition at Cloudflare of launching real products on April 1, instead of the usual joke product announcements circulating online today. In previous years, we've introduced impactful products like 1.1.1.1 and 1.1.1.1 for Families. Today, we're excited to continue this tradition by making every purge method available to all customers, regardless of plan type.
Cloudflare的传统是在4月1日推出真实产品,而不是今天在线流传的通常的笑话产品。在过去的几年中,我们推出了有影响力的产品,例如家庭的1.1.1和1.1.1.1。今天,无论计划类型如何,我们都能通过使所有客户都可以使用每种清除方法来继续这一传统。
During Birthday Week 2024, we announced our intention to bring the full suite of purge methods - including purge by URL, purge by hostname, purge by tag, purge by prefix, and purge everything - to all Cloudflare plans. Historically, methods other than "purge by URL" and "purge everything" were exclusive to Enterprise customers. However, we've been openly rebuilding our purge pipeline over the past few years (hopefully you've read some of our blog series), and we're thrilled to share the results more broadly. We've spent recent months ensuring the new Instant Purge pipeline performs consistently under 150 ms, even during increased load scenarios, making it ready for every customer.
在2024年生日周期间,我们宣布打算将完整的清除方法(包括URL清除,主机名清除,Tag清除,tag tag by Tag,Porge by Porge by Purge)都带入所有Cloudflare计划。从历史上看,除了“ url”和“清除一切”以外的方法是企业客户独有的。但是,在过去的几年中,我们一直在公开重建清除管道(希望您已经阅读了一些博客系列),我们很高兴能更广泛地分享结果。近几个月来,我们已经确保了新的即时清除管道在150毫秒以下始终如一,即使在增加负载方案中,也可以为每个客户做好准备。
But that's not all - we're also significantly raising the default purge rate limits for Enterprise customers, allowing even greater purge throughput thanks to the efficiency of our newly developed Instant Purge system.
但这还不是全部 - 我们也大大提高了企业客户的默认清除率限制,这得益于我们新开发的即时清除系统的效率,可以更大的清除吞吐量。
Building a better purge: a two-year journey
建立更好的清除:两年的旅程
Stepping back, today's announcement represents roughly two years of focused engineering. Near the end of 2022, our team went heads down rebuilding Cloudflare's purge pipeline with a clear yet challenging goal: dramatically increase our throughput while maintaining near-instant invalidation across our global network.
退后一步,今天的公告代表了大约两年的重点工程。在2022年底,我们的团队以一个明确但充满挑战的目标降低了Cloudflare的清除管道的重建:大大增加了我们的吞吐量,同时使我们的全球网络保持近乎固有的无效。
Cloudflare operates data centers in over 335 cities worldwide. Popular cached assets can reside across all of our data centers, meaning each purge request must quickly propagate to every location caching that content. Upon receiving a purge command, each data center must efficiently locate and invalidate cached content, preventing stale responses from being served. The amount of content that must be invalidated can vary drastically, from a single file, to all cached assets associated with a particular hostname. After the content has been purged, any subsequent requests will trigger retrieval of a fresh copy from the origin server, which will be stored in Cloudflare's cache during the response.
CloudFlare在全球335多个城市中运营数据中心。流行的缓存资产可以驻留在我们所有的数据中心中,这意味着每个清除请求都必须迅速传播到该内容的每个位置。收到清除命令后,每个数据中心必须有效地定位并使缓存的内容无效,从而阻止了陈旧的响应。必须无效的内容量可能会大大变化,从单个文件到与特定主机名相关的所有缓存资产。清除内容后,任何后续请求都会触发从Origin服务器中触发新副本的检索,该副本将在响应期间存储在Cloudflare的缓存中。
Ensuring consistent, rapid propagation of purge requests across a vast network introduces substantial technical challenges, especially when accounting for occasional data center outages, maintenance, or network interruptions. Maintaining consistency under these conditions requires robust distributed systems engineering.
确保在庞大的网络中确保清除请求的一致,快速传播会引入实质性的技术挑战,尤其是在考虑偶尔数据中心的中断,维护或网络中断时。在这些条件下保持一致性需要强大的分布式系统工程。
How did we scale purge?
我们是如何扩展清除的?
We've previously discussed how our new Instant Purge system was architected to achieve sub-150 ms purge times. It's worth noting that the performance improvements were only part of what our new architecture achieved, as it also helped us solve significant scaling challenges around storage and throughput that allowed us to bring Instant Purge to all users.
我们之前已经讨论了如何建立新的即时清除系统以达到150毫秒的清除时间。值得注意的是,绩效的改进只是我们新建筑所取得的成就的一部分,因为它也帮助我们解决了围绕存储和吞吐量的大量扩展挑战,这使我们能够即时清除所有用户。
Initially, our purge system scaled well, but with rapid customer growth, the storage consumption from millions of daily purge keys that needed to be stored reduced available caching space. Early attempts to manage this storage and throughput demand involved queues and batching for smoothing traffic spikes, but this introduced latency and underscored the tight coupling between increased usage and rising storage costs.
最初,我们的清除系统缩放得很好,但是随着客户增长的迅速增长,需要存储的数百万辆清除键的存储消耗可存储,从而减少了可用的缓存空间。早期管理此存储和吞吐量需求的尝试涉及排队和批处理以使流量平滑尖峰,但这引入了延迟,并强调了使用量增加和存储成本上升之间的紧密耦合。
We needed to revisit our thinking on how to better store purge keys and when to remove purged content so we could reclaim space. Historically, when a customer would purge by tag, prefix or hostname, Cloudflare would mark the content as expired and allow it to be evicted later. This is known as lazy-purge because nothing is actively removed from disk. Lazy-purge is fast, but not necessarily efficient, because it consumes storage for expired but not-yet-evicted content. After examining global or data center-level indexing for purge keys, we decided that wasn't viable due to increases in system complexity and the latency those indices could bring due to our network size. So instead, we opted for per-machine indexing, integrating indices directly alongside our cache proxies. This minimized network complexity, simplified reliability, and provided predictable scaling.
我们需要重新审视如何更好地存储清除键以及何时删除清除内容,以便我们可以收回空间。从历史上看,当客户通过TAG,前缀或主机名清除时,CloudFlare将标记内容为过期,并允许以后将其驱逐。这被称为懒惰,因为没有任何积极从磁盘中删除的东西。懒惰 - 普尔奇(Lazy-Purge)很快,但不一定是有效的,因为它消耗了过期但尚未引发的内容的存储空间。在检查了清除键的全球或数据中心级索引之后,我们认为由于系统复杂性的增加以及由于我们的网络大小而带来的延迟可能会带来的延迟。因此,我们选择了每机索引,将索引直接集成到我们的高速缓存代理。这种最小化的网络复杂性,简化的可靠性,并提供了可预测的缩放。
After careful analysis and benchmarking, we selected RocksDB, an embedded key-value store that we could optimize for our needs, which formed the basis of CacheDB, our Rust-based service running alongside each cache proxy. CacheDB manages indexing and immediate purge execution (active purge), significantly reducing storage needs and freeing space for caching.
经过仔细的分析和基准测试后,我们选择了RocksDB,RocksDB是一个嵌入式的键值商店,我们可以为我们的需求进行优化,这形成了CachedB的基础,CachedB是我们基于Rust的服务与每个缓存代理一起运行的。 CachedB管理索引和立即清除执行(主动清除),大大减少了存储需求以及缓存空间的空间。
Local queues within CacheDB buffer purge operations to ensure consistent throughput without latency spikes, while the cache proxies consult CacheDB to guarantee rapid, active purges. Our updated distribution pipeline broadcasts purges directly to CacheDB instances across machines, dramatically improving throughput and purge speed.
缓存缓冲区清洗操作中的本地队列,以确保无潜伏期尖峰的一致吞吐量,而高速缓存代理则咨询缓存B,以确保快速,主动的清除。我们更新的分销管道将广播直接清除到跨机器的CachedB实例上,从而大大提高了吞吐量和清除速度。
Using CacheDB, we've reduced storage requirements 10x by eliminating lazy purge storage accumulation, instantly freeing valuable disk space. The freed storage enhances cache retention, boosting cache HIT ratios and minimizing origin egress. These savings in storage and increased throughput allowed us to scale to the point where we can offer Instant Purge to more customers.
使用cachedb,我们通过消除懒惰的清除存储积累,立即释放有价值的磁盘空间来减少存储需求10倍。释放存储可增强缓存的保留,提高缓存命中率并最大程度地减少出口。这些节省的存储空间和增加的吞吐量使我们可以扩展到我们可以立即向更多客户提供清除的地步。
For more information
有关更多信息
免责声明:info@kdj.com
所提供的信息并非交易建议。根据本文提供的信息进行的任何投资,kdj.com不承担任何责任。加密货币具有高波动性,强烈建议您深入研究后,谨慎投资!
如您认为本网站上使用的内容侵犯了您的版权,请立即联系我们(info@kdj.com),我们将及时删除。
-
- Dawgz AI(DAGZ)是现在购买的最佳模因硬币。这不是门槛或史巴
- 2025-04-06 21:25:13
- 现在购买的最佳模因硬币可能不是Doge或Shiba,而这正是加密人群嗡嗡作响的原因。
-
-
- 比特币刚刚结束了七年来最糟糕的第一季度,痛苦可能还没有结束。
- 2025-04-06 21:20:13
- 比特币结束了近13%,在周一的亚洲交易时间内下跌至80,00美元。
-
-
-
-
- 以太坊和比特币经历了截然不同的轨迹
- 2025-04-06 21:10:13
- 以太坊和比特币在2025年第一季度经历了截然不同的轨迹,而差异并不明显。
-
-
- 比特币主导着加密货币市场,将山寨币留在灰尘中
- 2025-04-06 21:05:12
- 2025年的第一季度是由Altcoin季节的谈话主导的,就像公牛周期结束时一样。