Add loadbalancer documentation#5555
Conversation
1e0b0ae to
e3ca504
Compare
cda1411 to
b4577f8
Compare
|
We could link this to https://docs.pingcap.com/tidb/stable/java-app-best-practices |
|
We should consider merging or linking this with https://docs.pingcap.com/tidb/stable/haproxy-best-practices |
|
/label needs-cherry-pick-5.0 |
You can link this to these docs in this PR. |
6044d7c to
0b239c6
Compare
|
/merge |
|
@morgo: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
@TomShawn PTAL |
|
|
||
| The first type of loadbalancing that is available is *connector based loadbalancing*. Many of the MySQL connectors like MySQL Connector/J and MySQL Connector/C++. The benefits from this are that there is no extra network hop and the application has more information about which server it is connected to. The drawback of this is that there is no central administration and when changing the configuration you have to do this on all your application hosts. Depending on the programming language you are using the loadbalancing may not be available or not offer more advanced options. This can work with most third-party applications as this is often configured in the connection string (JDBC url for Java for example). | ||
|
|
||
| It is also possible to use DNS round-robin. However this is not advisable as this won't prevent connections from going to a machine that is unavailable. This means that your application may have to re-try connections more often if not all servers are available. |
There was a problem hiding this comment.
If this is not advisable, then we should not document it here.
There was a problem hiding this comment.
As DNS-RR is a common practice I think we should explain here why other solutions are better.
@morgo what's your take on this?
There was a problem hiding this comment.
I agree with @dveeden , it's very common and users need to know why we don't recommend it.
|
@dveeden This is really a great article with a comprehensive introduction to loadbalancing. These are my general comments. PTAL for reference. Some part of it, to me, looks like a blog post article that uses plain passages than a user document which usually prefers listing things out in unordered/ordered lists or tables (in a really structured layout). For example, the "Loadbalancing types" section introduces several types. It might be better to organize the information of this passage using a table, which makes your information clearer and more readable to readers.
Another question is the target audience. To me, this can be confusing. I think it would be better to clarify what this article introduces and its aim at the very beginning. Then readers will get a general idea of the article from the beginning and decide whether or not to go on reading.
Then it is about the language style issue. In user documentation, we usually follow these styles:
|
Co-authored-by: Morgan Tocker <tocker@gmail.com> Co-authored-by: bb7133 <bb7133@gmail.com>
|
@TomShawn I went over your comments. For the loadbalancer types I don't know if we should:
What do you think? |
|
In some places (pingcap/tidb, pingcap/docs, pingcap/tidb-operator) the solution with envoy an istio is used. However I don't think that should be part of this PR as that's mostly a TiDB Operator thing. |
|
This has been published as a blog instead of as part of the documentation. |
|
@dveeden: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What is changed, added or deleted? (Required)
Add documentation about how to use loadbalancers with TiDB
Which TiDB version(s) do your changes apply to? (Required)