Running vshard routers on application threads

Đang mở Phù hợp với người mới
#5,756 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
68/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
lua
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu bằng cách tìm tài liệu cấu hình bộ định tuyến vshard và phần về sharding.router_thread_group. Giải thích rằng nhóm phải được định nghĩa trong threads.groups, đồng thời ghi lại các lưu ý về luồng ứng dụng liên quan đến các bản xuất IPROTO, quyền lua_call và hành vi khởi tạo theo từng luồng. Hoàn thành khi người dùng có thể cấu hình và vận hành bộ định tuyến trên các luồng ứng dụng theo hướng dẫn được tài liệu hóa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
CSS
Star
16
Fork
49
Merge trung bình
5 ngày 18 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tarantool/doc

Tất cả issue của tarantool/doc

Issue tương tự

Thêm issue về Documentation

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.