An overview of database proxies, their advantages, and disadvantages.
What is a database proxy? appeared first on MariaDB.org
A proxy is a server software, typically installed in a separate machine, that forwards requests to servers on behalf of clients. When the proxy is in the local network of the client, it’s called simply proxy or forward proxy. If it is in the local network of the server, it’s called a reverse proxy. Proxies can add functionality to a system without having to change or even notify clients and servers.
A database proxy is a type of reverse proxy tailored to databases. It takes requests from clients like web applications and forwards them to a database server using configurations that are specific to databases. An intelligent database proxy understands SQL and is able to make decisions on how to treat requests based on configurable rules. This understanding of the database protocols and languages allows database proxies to add functionality, mainly in four categories:
What are the advantages of database proxies?#The main advantage of using a database proxy is that it isolates the database topology from application configuration:
When evaluating database proxies, you should consider the following:
If your application connects to a single database instance and doesn’t require things such as high availability or scaling, a database proxy introduces more complexity than needed. However, if you need other features such as automatic data masking or transparent integrations with Kafka or NoSQL protocols, a database proxy is useful even if there’s no need for high availability and scaling.
How to use a database proxy?#A database proxy is installed on a machine and configured to monitor the database nodes and handle requests according to specific requirements. For example, MariaDB MaxScale can be used for transparent read-write splitting where SQL inserts, deletes, and updates are routed to primary (or master) nodes, and SQL selects to replica nodes enabling zero-downtime scale (both up and down). You can see this in action in this video:
Enjoyed this post? I can help your team implement similar solutions—contact me to learn more.
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | The State of ProxySQL, 2020 Edition – Percona Live ONLINE Talk Preview | 0 | 15.26 | 16-10-2020 |
| 2 | Using ProxySQL with Azure Database for MySQL / MariaDB – a little hack | 0 | 3.42 | 10-06-2020 |
| 3 | What is MariaDB? | 0 | 7.66 | 21-09-2023 |
| 4 | How to build a ProxySQL compatible with Azure Database for MySQL / MariaDB – | 0 | 6.98 | 12-06-2020 |
| 5 | Why MariaDB instead of MySQL, PostgreSQL, or MongoDB? | 0 | 5.85 | 25-02-2023 |
| 6 | ProxySQL connection redirection experiment with Azure database for MySQL/MariaDB. 1/2 | 0 | 3.73 | 21-07-2020 |
| 7 | New book (coming) – MariaDB for Developers | 0 | 7.06 | 31-12-2023 |
| 8 | ProxySQL connection redirection experiment with Azure database for MySQL/MariaDB. 2/2 | 0 | 4.62 | 24-07-2020 |
| 9 | ProxySQL connection redirection experiment with Azure database for MySQL/MariaDB. 3/3 | 0 | 7.47 | 24-07-2020 |
| 10 | Using ProxySQL Query Mirroring to test query performance on a new cluster | 0 | 5.29 | 01-05-2024 |