Running vshard routers on application threads

オープン 初心者向け
#5,756 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
活発
技術スタック
lua
領域
documentation

調査の方向性

まず、vshardルーターの設定ドキュメントと sharding.router_thread_group のセクションを探します。グループを threads.groups で定義する必要があることを説明し、IPROTOエクスポート、lua_call の権限、スレッドごとのブートストラップ動作に関するアプリケーションスレッドの注意事項を記載します。ユーザーがドキュメントのガイダンスに従ってアプリケーションスレッド上でルーターを設定、運用できる状態になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

The new configuration option sharding.router_thread_group specifies
the name of the thread group where the vshard router module will be
loaded and configured. The group must be defined in threads.groups.
The default value is "tx" (run the router on the main thread).

Using an alternative thread group is the way to scale the vshard router
performance within the same process, without spawning extra Tarantool
instances.

Notes about using vshard in application threads:

  • Adding a function to the global Lua namespace _G in an application
    thread does not export the function in IPROTO. Instead you should use
    box.iproto.export(), which works both in the main and application
    threads.
  • To grant a user a permission to execute a function exported in an
    application thread over IPROTO, you should add the corresponding
    lua_call privilege to the config file. The execute access to
    the universe or the super role won't work.
  • Each application thread acts as an independent router although they
    all take requests from the same IPROTO port. In particular, this
    means that vshard.router.bootstrap should be called once or
    if_not_bootstrapped option should be used, just like with routers
    running on different Tarantool instances.
    Requested by @locker in https://github.com/tarantool/tarantool/commit/68fe9c1da2cf4f4a2d83ce7356faf30cd1c9d250.
主要言語
CSS
スター
16
フォーク
49
平均マージ
5日 18時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tarantool/doc のほかの issue

tarantool/doc の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。