Running vshard routers on application threads

Aperta Adatta ai principianti
#5,756 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
68/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
lua
Ambito
documentation

Direzione di ricerca

Inizia trovando la documentazione sulla configurazione del router vshard e la sezione relativa a sharding.router_thread_group. Spiega che il gruppo deve essere definito in threads.groups e documenta le note sui thread dell’applicazione riguardanti le esportazioni IPROTO, i privilegi lua_call e il comportamento di bootstrap per thread. Il lavoro è completato quando gli utenti possono configurare e usare i router sui thread dell’applicazione seguendo le indicazioni documentate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
CSS
Stelle
16
Fork
49
Merge medio
5g 18h
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tarantool/doc

Tutte le issue di tarantool/doc

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.