blob: 9032a4246644df60206cb68237e2b6930d84248a [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Pegasus | Pegasus Server 2.0.0 来了</title>
<link rel="stylesheet" href="/assets/css/app.css">
<link rel="shortcut icon" href="/assets/images/favicon.ico">
<link rel="stylesheet" href="/assets/css/utilities.min.css">
<link rel="stylesheet" href="/assets/css/docsearch.v3.css">
<script src="/assets/js/jquery.min.js"></script>
<script src="/assets/js/all.min.js"></script>
<script src="/assets/js/docsearch.v3.js"></script>
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Pegasus Server 2.0.0 来了 | Pegasus</title>
<meta name="generator" content="Jekyll v4.3.3" />
<meta property="og:title" content="Pegasus Server 2.0.0 来了" />
<meta name="author" content="吴涛" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="Pegasus Server 又发布新版本了!在去年的几个版本演进中,我们把工作的重点放在了Pegasus的服务稳定性上。在今年的 2.0.0 版本中,我们更进一步,提供了如下几个能够显著减少延迟和抖动的机制。" />
<meta property="og:description" content="Pegasus Server 又发布新版本了!在去年的几个版本演进中,我们把工作的重点放在了Pegasus的服务稳定性上。在今年的 2.0.0 版本中,我们更进一步,提供了如下几个能够显著减少延迟和抖动的机制。" />
<meta property="og:site_name" content="Pegasus" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2020-06-19T00:00:00+00:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Pegasus Server 2.0.0 来了" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"吴涛"},"dateModified":"2020-06-19T00:00:00+00:00","datePublished":"2020-06-19T00:00:00+00:00","description":"Pegasus Server 又发布新版本了!在去年的几个版本演进中,我们把工作的重点放在了Pegasus的服务稳定性上。在今年的 2.0.0 版本中,我们更进一步,提供了如下几个能够显著减少延迟和抖动的机制。","headline":"Pegasus Server 2.0.0 来了","mainEntityOfPage":{"@type":"WebPage","@id":"/2020/06/19/pegasus-2.0.0-is-out.html"},"url":"/2020/06/19/pegasus-2.0.0-is-out.html"}</script>
<!-- End Jekyll SEO tag -->
</head>
<body>
<nav class="navbar is-info">
<div class="container">
<!--container will be unwrapped when it's in docs-->
<div class="navbar-brand">
<a href="/" class="navbar-item ">
<!-- Pegasus Icon -->
<img src="/assets/images/pegasus.svg">
</a>
<div class="navbar-item">
<a href="/docs" class="button is-primary is-outlined is-inverted">
<span class="icon"><i class="fas fa-book"></i></span>
<span>Docs</span>
</a>
</div>
<div class="navbar-item is-hidden-desktop">
<!--A simple language switch button that only supports zh and en.-->
<!--IF its language is zh, then switches to en.-->
<a class="button is-primary is-outlined is-inverted" href="/zh/2020/06/19/pegasus-2.0.0-is-out.html"><strong></strong></a>
</div>
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navMenu">
<!-- Appears in mobile mode only -->
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div class="navbar-menu" id="navMenu">
<div class="navbar-end">
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable ">
<a href=""
class="navbar-link ">
<span class="icon" style="margin-right: .25em">
<i class="fas fa-users"></i>
</span>
<span>
ASF
</span>
</a>
<div class="navbar-dropdown">
<a href="https://www.apache.org/"
class="navbar-item ">
Foundation
</a>
<a href="https://www.apache.org/licenses/"
class="navbar-item ">
License
</a>
<a href="https://www.apache.org/events/current-event.html"
class="navbar-item ">
Events
</a>
<a href="https://www.apache.org/foundation/sponsorship.html"
class="navbar-item ">
Sponsorship
</a>
<a href="https://www.apache.org/security/"
class="navbar-item ">
Security
</a>
<a href="https://privacy.apache.org/policies/privacy-policy-public.html"
class="navbar-item ">
Privacy
</a>
<a href="https://www.apache.org/foundation/thanks.html"
class="navbar-item ">
Thanks
</a>
</div>
</div>
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable ">
<a href="/community"
class="navbar-link ">
<span class="icon" style="margin-right: .25em">
<i class="fas fa-user-plus"></i>
</span>
<span>
Community
</span>
</a>
<div class="navbar-dropdown">
<a href="/community/#contact-us"
class="navbar-item ">
Contact Us
</a>
<a href="/community/#contribution"
class="navbar-item ">
Contribution
</a>
<a href="https://cwiki.apache.org/confluence/display/PEGASUS/Coding+guides"
class="navbar-item ">
Coding Guides
</a>
<a href="https://github.com/apache/incubator-pegasus/issues?q=is%3Aissue+is%3Aopen+label%3Atype%2Fbug"
class="navbar-item ">
Bug Tracking
</a>
<a href="https://cwiki.apache.org/confluence/display/INCUBATOR/PegasusProposal"
class="navbar-item ">
Apache Proposal
</a>
</div>
</div>
<a href="/blogs"
class="navbar-item ">
<span class="icon" style="margin-right: .25em">
<i class="fas fa-rss"></i>
</span>
<span>Blog</span>
</a>
<a href="/docs/downloads"
class="navbar-item ">
<span class="icon" style="margin-right: .25em">
<i class="fas fa-fire"></i>
</span>
<span>Releases</span>
</a>
</div>
<div class="navbar-item is-hidden-mobile">
<!--A simple language switch button that only supports zh and en.-->
<!--IF its language is zh, then switches to en.-->
<a class="button is-primary is-outlined is-inverted" href="/zh/2020/06/19/pegasus-2.0.0-is-out.html"><strong></strong></a>
</div>
</div>
</div>
</nav>
<section class="section">
<div class="container">
<div class="columns is-multiline">
<div class="column is-one-fourth">
</div>
<div class="column is-half">
<div class="content">
<ul class="blog-post-meta">
<li class="blog-post-meta-item">
<span class="icon" style="margin-right: .25em">
<i class="far fa-calendar-check" aria-hidden="true"></i>
</span>
June 19, 2020
</li>
<li class="blog-post-meta-item">
<span class="icon" style="margin-right: .25em">
<i class="fas fa-edit" aria-hidden="true"></i>
</span>
吴涛
</li>
</ul>
<p>Pegasus Server 又发布新版本了!在去年的几个版本演进中,我们把工作的重点放在了Pegasus的服务稳定性上。在今年的 2.0.0 版本中,我们更进一步,提供了如下几个能够显著减少延迟和抖动的机制。</p>
<blockquote>
<p>Github Release: <a href="https://github.com/apache/incubator-pegasus/releases/tag/v2.0.0">https://github.com/apache/incubator-pegasus/releases/tag/v2.0.0</a></p>
</blockquote>
<h2 id="跨机房异步复制">跨机房异步复制</h2>
<p>通过这个功能,我们可以把一个Pegasus表同时部署在主-备双集群上,从而支持业务的异地容灾,因为理论上双集群同时抖动甚至故障的概率要比单集群低很多。作为一个附带的优点,P99延迟相比单集群也会有显著改善。</p>
<p>这个方案唯一的代价是成本。因为一个数据写两份到双集群,总写入量翻倍,我们需要更多的机器来支持双倍写入量。</p>
<h2 id="backup-request">Backup Request</h2>
<p>该功能的意义在于以牺牲读一致性为代价, 换取更稳定的延迟。在推荐,广告等场景中,一致性的牺牲往往是可容忍的。</p>
<p>Backup Request 的实现原理很简单,如果 Pegasus 客户端发现访问延迟超过一定阈值,则会自动访问备节点。这对改善长尾延迟(tail latency)非常有帮助。在我们的测试下,长尾延迟(P999读)往往能降低 2-5 倍。</p>
<h2 id="扩容优化">扩容优化</h2>
<p>此前Pegasus在扩容时的大量数据搬迁会造成用户读延迟增高,我们研究后发现,其原因是新节点一边搬迁数据,一边提供读服务。</p>
<p>通过扩容优化工具,Pegasus集群的新节点会在数据迁移完成后,才提供读服务。在测试下,使用该工具能将扩容时的P999读延迟显著降低20~30倍(600ms-&gt;20ms)。</p>
<h2 id="冷备份限流">冷备份限流</h2>
<p>此前Pegasus缺少对冷备份的限流, 容易导致快照数据上传至FDS(小米内部对象存储)时的流量过高。现在我们补齐了这个缺陷。</p>
<h2 id="结语">结语</h2>
<p>这次我们将版本号推进到 2.0,主要是因为该版本引入了向下不兼容的修改。因此我们也同时发布了 1.12-comp-with-2.0 版本,在出现问题而需要紧急回退的时候,可以回退至该版本。待问题修复后,可以继续升级至 2.0.0。</p>
<p>当然,更多改进还在路上。Pegasus 2.0.0 只是我们在上一个阶段的成果,我们将会更快地推进 Pegasus 的开发进程,以提供一个更稳定,更高效,更易用的存储系统。</p>
<p><strong>最后,感谢所有使用过,参与过Pegasus的同学的支持。</strong></p>
<blockquote>
<p>PS: 上述功能的详细测试细节后续会以博客形式发布</p>
</blockquote>
</div>
<div class="tags">
</div>
</div>
<div class="column is-one-fourth is-hidden-mobile" style="padding-left: 3rem">
<p class="menu-label">
<span class="icon">
<i class="fa fa-bars" aria-hidden="true"></i>
</span>
Table of contents
</p>
<ul class="menu-list">
<li><a href="#跨机房异步复制">跨机房异步复制</a></li>
<li><a href="#backup-request">Backup Request</a></li>
<li><a href="#扩容优化">扩容优化</a></li>
<li><a href="#冷备份限流">冷备份限流</a></li>
<li><a href="#结语">结语</a></li>
</ul>
</div>
</div>
</div>
</section>
<footer class="footer">
<div class="container">
<div class="content is-small has-text-centered">
<div style="margin-bottom: 20px;">
<a href="http://incubator.apache.org">
<img src="/assets/images/egg-logo.png"
width="15%"
alt="Apache Incubator"/>
</a>
</div>
Copyright &copy; 2023 <a href="http://www.apache.org">The Apache Software Foundation</a>.
Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version
2.0</a>.
<br><br>
Apache Pegasus is an effort undergoing incubation at The Apache Software Foundation (ASF),
sponsored by the Apache Incubator. Incubation is required of all newly accepted projects
until a further review indicates that the infrastructure, communications, and decision making process
have stabilized in a manner consistent with other successful ASF projects. While incubation status is
not necessarily a reflection of the completeness or stability of the code, it does indicate that the
project has yet to be fully endorsed by the ASF.
<br><br>
Apache Pegasus, Pegasus, Apache, the Apache feather logo, and the Apache Pegasus project logo are either
registered trademarks or trademarks of The Apache Software Foundation in the United States and other
countries.
</div>
</div>
</footer>
<script src="/assets/js/app.js" type="text/javascript"></script>
</body>
</html>