Comments (7)
Sorry if this is a dumb question: Would it make sense to simply put a pgpool/pgbouncer in front of stolon proxy in order to ensure connection pooling (and only pooling in pgpool case)?
from stolon.
@thedrow Actually the proxy is just a a dumb tcp proxy so for every incoming tcp connection it opens a tcp connection to the current master. This was done for different needs:
- Have multiple proxies to avoid any spof.
- Let the data pass between the client and the proxy untouched.
Keeping a connection pool cannot probably be done with a layer 4 proxy like the actual but needs a layer7 proxy making the proxy talk the postgres protocol with the client and with the server
I understand your requirement since some application aren't keeping an own connection pool but I'm not sure this needs to be a function provided by the stolon proxy since its main purpose is to direct clients to the right master.
Since, for an application, connecting to the stolon proxy is the same as directly connecting to the stolon master (what changes is just the ip to connect to), what about using already existing connection polling mechanism (like pgpool-II in connection pooling mode that will point to the stolon proxy)?
from stolon.
That is entirely possible but incurs the overhead of transmitting the query and the results through two proxies.
Extending the proxy's capability to be a smarter implementation of pgpool-II will provide more value to the community.
The question is if we want stolon to be a one stop shop for all our PG operational needs or if we'd like to provide a partial solution that will require us to use other components in order to achieve our operational goals.
from stolon.
Closing since making the proxy a pgpool clone doesn't makes sense and doesn't fit with the stolon architecture. Plus connection pooling should be done by the application.
from stolon.
I'd like to ask the same question as @davidberardozzi .
I intend to access stolon from a serverless architecture, where it's hard or even impossible for the application to do the pooling by itself (in the sense that each HTTP endpoint is backed by just one single stateless lambda/function, not a stateful application), an external pooler is required.
from stolon.
@ccll the stolon-proxy purpose is to redirect to the right master and close connections to old masters, adding connection pooling to it is another feature that will require a lot of work, make the proxy talk at layer 7 and not layer 4 and do all the work that pgpool is already doing (i.e. reset session). The solution is to make your application talks with pgpool and pgpool will point the stolon proxies. The overhead of adding another hop should be negligible.
from stolon.
@sgotti External pooling looks cool, I'll try that later, thanks for the tip.
from stolon.
Related Issues (20)
- Update the example of kubernetes and question about helm chart. HOT 2
- Why PSQL version is 10 at the helm chart? HOT 3
- Can we change Sync_Priority value for a standby ? HOT 1
- Whether stolon supports dual master mode.
- stolonctl run inide kubernetes pod HOT 1
- How to debug the program? HOT 1
- no keeper info available problem HOT 1
- What is the best deployment model on kubernetes?
- Exception occurred when viewing "leader sentinel" log.
- stolonctl update 更新pg参数没生效 HOT 1
- go upgrade (1.20.3) - compile error using "k8s.io/api v0.18.19" instead of "k8s.io/api v0.17.3" HOT 1
- Can`t restore a backup HOT 1
- stolon-proxy can not reconnect etcd
- Keeper is shown as unhealthy/unknown, but keeper process thinks it is fine HOT 1
- Stolon does not recover after temporary full disk on master keeper HOT 3
- Does stolon not support using logical replication between clusters while using streaming replication internally?
- Make Keeper, Sentinel, Proxy public
- Why is the unix_socket_directories parameter not supported for configuration?
- Node restart leads to data loss of the entire cluster HOT 1
- etcd-operator adoption
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stolon.