4 ms·
Would be interesting to know if and to which extend the quite new Multiple Databases feature of ActiveRecord [1] (introduced with Rails 6) helped achieving this
by top_sigrid 4y ago
Would be interesting to know if and to which extend the quite new Multiple Databases feature of ActiveRecord [1] (introduced with Rails 6) helped achieving this.
- [1] https://guides.rubyonrails.org/active_record_multiple_databases.html https://guides.rubyonrails.org/active_record_multiple_databa...
- dnsmichi 4y agoGitLab team member here. Thanks for asking - I have forwarded your question; sharing a summary what I learned below. Note that I am not a Rails engineer; for deeper questions I'd suggest commenting into the linked issues and tag engineers directly :) Rails 6+ multiple database support is being used by GitLab. The major difference is that a hand-rolled DB load balancer is currently used. [0] tracks the effort to change the load balancer to the native Rails implementation for connection handling. This comment summarizes [1] how things worked, and how Rails' support of multiple databases can help. It also provides flow diagrams and code snippets for better understanding. Side note: The multiple database feature effort is also related to bringing Clickhouse as a datastore for Error Tracking [2] and more Observability data [3]. [0] https://gitlab.com/gitlab-org/gitlab/-/issues/296870 https://gitlab.com/gitlab-org/gitlab/-/issues/296870 [1] https://gitlab.com/gitlab-org/gitlab/-/issues/296870#note_889536832 https://gitlab.com/gitlab-org/gitlab/-/issues/296870#note_88... [2] https://gitlab.com/groups/gitlab-org/-/epics/7772 https://gitlab.com/groups/gitlab-org/-/epics/7772 [3] https://about.gitlab.com/direction/monitor/observability/#unified-data-store https://about.gitlab.com/direction/monitor/observability/#un...
- top_sigrid 4y agoWow, thanks a lot!
- semiquaver 4y agoInterestingly enough this functionality in rails was partly developed by GitHub employees while we went through a similar process a few years ago.