RDS代理会影响当前的应用程序池吗? [英] Does RDS proxy affects current application side pooling?

查看:79
本文介绍了RDS代理会影响当前的应用程序池吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在AWS ECS上有一个Saas应用程序,在AWS RDS上有数据库.我们计划实施AWS RDS代理以实现池实施.从RDS代理文档中,我看到我们不需要对应用程序代码进行任何更改.当前,我们正在使用应用程序端连接池.当我们为池实现RDS代理时,当前的池是否有影响?

I have a Saas application on AWS ECS and databases on AWS RDS. We are planning to implement AWS RDS Proxy for pooling implementation. From the RDS proxy documentation, I saw that we don't need to make any changes to the application code. Currently, we are using application side connection pooling. When we implement an RDS proxy for pooling, does the current pooling have any impact?

我们是否需要删除应用程序侧池才能有效地使用RDS?

Do we need to remove the application side pooling to work with RDS effectively?

我主要关心的是,如果我在RDS代理中选择100%池,并且从应用程序池配置中选择我们限制为100个最大连接.这会成为瓶颈吗?

My main concern is, if I choose 100% pooling in RDS proxy and from application pooling configuration if we limit that to say 100 max connection. Will that be a bottleneck?

推荐答案

中间有一个数据库代理,与连接"有两条不同的支腿:

With a database proxy in the middle, there are two separate legs to a "connection":

  1. 首先,应用程序与代理之间存在连接.您所谓的应用程序池"是这种类型的连接.由于创建这种类型的连接的新实例仍然有开销,因此继续在应用程序中使用连接池可能是一个好主意.
  2. 第二,从代理到数据库之间存在连接.这些连接由代理管理.此类型的连接数由代理配置控制.如果将此配置设置为100%,则表示允许代理使用最多因此,当您的应用程序要使用连接时,它需要从其本地池中获取连接.然后,代理需要将其与数据库连接配对.代理将在可能的情况下重用与数据库的连接(此技术也称为

    So, when your application wants to use a connection, it needs to get a connection from its local pool. Then, the proxy needs to pair that with a connection to the database. The proxy will reuse connections to the database where possible (this technique also is called multiplexing).

    或者,引用官方文档:您可以打开许多同时连接到代理的连接,并且代理使向数据库实例或集群开放的连接数量减少.这样做进一步减少了数据库服务器上连接的内存开销.该技术还减少了连接过多"的可能性.错误."

    Or, quoting the official docs: "You can open many simultaneous connections to the proxy, and the proxy keeps a smaller number of connections open to the DB instance or cluster. Doing so further minimizes the memory overhead for connections on the database server. This technique also reduces the chance of "too many connections" errors."

    这篇关于RDS代理会影响当前的应用程序池吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆