<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="group-replication-group-write-consensus">
      </a>
      20.5.1.3 Using Group Replication Group Write Consensus
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045133538528">
  </a>
  <a class="indexterm" name="idm46045133537040">
  </a>
  <p>
   This section explains how to inspect and configure the maximum
        number of consensus instances at any time for a group. This
        maximum is referred to as the event horizon for a group, and is
        the maximum number of consensus instances that the group can
        execute in parallel. This enables you to fine tune the
        performance of your Group Replication deployment. For example,
        the default value of 10 is suitable for a group running on a
        LAN, but for groups operating over a slower network such as a
        WAN, increase this number to improve performance.
  </p>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h5 class="title">
       <a name="group-replication-inspect-write-concurrency">
       </a>
       Inspecting a Group's Write Concurrency
      </h5>
     </div>
    </div>
   </div>
   <a class="indexterm" name="idm46045133533760">
   </a>
   <a class="indexterm" name="idm46045133532256">
   </a>
   <a class="indexterm" name="idm46045133531216">
   </a>
   <a class="indexterm" name="idm46045133529728">
   </a>
   <p>
    Use the
    <a class="link" href="group-replication-functions-for-maximum-consensus.html#function_group-replication-get-write-concurrency">
     <code class="literal">
      group_replication_get_write_concurrency()
     </code>
    </a>
    function to inspect a group's event horizon value at runtime
          by issuing:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa55983886"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> group_replication_get_write_concurrency<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h5 class="title">
       <a name="group-replication-configure-write-concurrency">
       </a>
       Configuring a Group's Write Concurrency
      </h5>
     </div>
    </div>
   </div>
   <a class="indexterm" name="idm46045133523520">
   </a>
   <a class="indexterm" name="idm46045133522016">
   </a>
   <a class="indexterm" name="idm46045133520976">
   </a>
   <a class="indexterm" name="idm46045133519488">
   </a>
   <p>
    Use the
    <a class="link" href="group-replication-functions-for-maximum-consensus.html#function_group-replication-set-write-concurrency">
     <code class="literal">
      group_replication_set_write_concurrency()
     </code>
    </a>
    function to set the maximum number of consensus instances that
          the system can execute in parallel by issuing:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa49686299"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> group_replication_set_write_concurrency<span class="token punctuation">(</span><em class="replaceable">instances</em><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
   </div>
   <p>
    where
    <em class="replaceable">
     <code>
      instances
     </code>
    </em>
    is the new maximum
          number of consensus instances. The
    <a class="link" href="privileges-provided.html#priv_group-replication-admin">
     <code class="literal">
      GROUP_REPLICATION_ADMIN
     </code>
    </a>
    privilege is required to use this function.
   </p>
  </div>
 </div>
 <br/>
</div>
