8 Star 33 Fork 15

中启开源 / zqpool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MulanPubL-2.0

ZQPool

介绍

ZQPool是 中启乘数科技 发布的PostgreSQL数据的开源连接池软件。主要解决PostgreSQL生态中流行的连接池软件pgbouncer软件的一些缺点。

通常使用数据库连接池的主要目的有两个:

  1. 减少到数据库上的连接数。应用程序到连接池软件上有M个连接,这M个连接不是同时都繁忙的,这M个连接上同一个时刻发来的并发SQL可能只有N个(N通常大大小于M),这样连接池软件只需要在后端数据库上建N个连接。就可以满足了要求。这个场景通常是java应用。 我们可以想象一个场景:一个java应用可能部署在200台主机上,而每个主机上java应用自身会开启一个java连接池,这个java连接池假设开20个连接,这时到数据库上就有200*20=4000个连接,这些连接实际上多数时间都是空闲的,少数时间才是活跃的。 4000个连接,PostgreSQL数据库就需要启动4000个进程,太多连接会降低数据库的效率。

  2. 减少短连接应用花在新建数据库连接的时间。PostgreSQL数据库对每一个连接需要fork出一个新的进程来提供服务,而每次fork一个进程是需要时间的。而连接池软件可以预先建好到数据库的连接,应用程序连接到连接池软件后,连接池软件可以从池中取一个已经建好的连接马上提供服务,这样就大大减少了新连接的时间。这个场景的典型应用是php应用。php应用到数据库通常是短连接。

而PostgreSQL数据库中流行的pgbouncer通常解决不了上面的第一个问题(java应用):即减少到数据库上连接的目的。 要减少到数据库上的连接数,pgbouncer连接池的模式只能配置成语句级或事务级,不能配置成会话级,因为pgbouncer在会话级下,前面来多少个连接,到数据库也必须建多少连接,根本起不到减少数据库连接的目的。当我们把pgbouncer配置成语句级或事务级时,java应用连接pgbouncer会报错:

org.postgresql.util.PSQLException: ERROR: prepared statement "S_1" already exists 

这个原因是jdbc执行SQL是分两个步骤的:

  1. 先使用Prepare的SQL,即:“prepare S_1 as select * from test01 where id=$1;”
  2. 然后再“execute S1(1);”

报错的原因为:

  1. 执行“prepare S_1 as select * from test01 where id=$1;”时,从连接池中取一个连接A,执行后,就释放了此连接;
  2. 执行“execute S_1(1);”,再从连接池中获得一个连接,这时获得的连接可能已经不是之前的连接,这个新连接中没有Prepare语句“S_1”,所以就报错了;
  3. 如果又来了另一个SQL,可能从连接池中取到的还是之前的连接A,然后再执行“prepare S_1 as select * from test02 where id=$1;”,但这个prepare SQL 的名字S_1已经被前面的SQL占用,这时就报错了。
  4. 当然jdbc的实际行为比上面描述的要复杂的多,但原理大致就是上面描述的这个过程。

而ZQPool通过记录一个连接上的Prepare SQL的名字,并替换成不重复的名字的方式解决了这个问题。

pgbouncer还有一个缺点,处理SQL的转发只能用到CPU的一个核,即pgbouncer是单线程程序。对于高并发的情况下,超过单核的性能时,就会立即出现瓶颈。而ZQPool是使用golang的协程技术,可以利用了多核的性能,下面是我们在一台2颗 Intel(R) Xeon(R) Silver 4210R CPU @ 2.40GHz的物理机上做的测试:

这是pgbouncer的测试情况:

[postgres@csyun01 ~]$ pgbench -h 10.197.160.18 -p 6432 -Uu01  -S -P 2  -T 30 -c 32
pgbench (14.3)
starting vacuum...end.
progress: 2.0 s, 30407.5 tps, lat 1.050 ms stddev 0.180
progress: 4.0 s, 30108.6 tps, lat 1.062 ms stddev 0.182
progress: 6.0 s, 30231.5 tps, lat 1.058 ms stddev 0.179
progress: 8.0 s, 31157.9 tps, lat 1.026 ms stddev 0.176
progress: 10.0 s, 30491.7 tps, lat 1.049 ms stddev 0.178
progress: 12.0 s, 30463.0 tps, lat 1.050 ms stddev 0.180
progress: 14.0 s, 30366.2 tps, lat 1.053 ms stddev 0.179
progress: 16.0 s, 30177.5 tps, lat 1.060 ms stddev 0.180
progress: 18.0 s, 30067.1 tps, lat 1.064 ms stddev 0.181
progress: 20.0 s, 30420.1 tps, lat 1.051 ms stddev 0.177
...
...
...

这是使用ZQPool测试的情况:

[postgres@csyun01 ~]$ pgbench -h 10.197.160.18 -p 5436 -Uu01  -S -P 2  -T 30 -c 32
Password:
pgbench (14.3, server 10.5)
starting vacuum...end.
progress: 2.0 s, 111134.7 tps, lat 0.213 ms stddev 0.058
progress: 4.0 s, 112688.1 tps, lat 0.209 ms stddev 0.058
progress: 6.0 s, 114570.8 tps, lat 0.207 ms stddev 0.054
progress: 8.0 s, 107305.3 tps, lat 0.216 ms stddev 0.066
progress: 10.0 s, 108680.1 tps, lat 0.215 ms stddev 0.063
progress: 12.0 s, 108867.6 tps, lat 0.214 ms stddev 0.064
...
...
...

可以看到ZQPool的tps可以到10万每秒,而pgbouncer最多到3万每秒就上不去了。

最后总结以下,ZQPool主要解决pgbouncer的两个缺点:

  1. 解决java等应用使用pgbouncer连接池无法减少数据库上连接数的问题;
  2. pgbouncer不能利用到CPU的多核,当对高并发的情况下,处理能力超过了单核的能力时,性能就再也上不去了。

软件架构

应用程序连接到ZQPool,ZQPool连接到PostgreSQL数据库。

安装教程

安装方法如下:

  1. 把发行版本zqpool1.0.x86_64.tar.xz拷贝到一个目录中
  2. 解压:tar xf zqpool1.0.x86_64.tar.xz
  3. 解压后有两个文件zqpool.conf和zqpool,其中zqpool.conf是配置文件,做相应的配置。
  4. 然后启动./zqpool 即可

编译的方法:

  1. git clone https://gitee.com/csudata/zqpool
  2. cd zqpool
  3. make 把编译生成的可执行文件zqpool和zqpool.conf也拷贝到一个目录中即可。

使用说明

配置zqpool.conf文件,各个配置项说明如下:

  • listen_port = 5436 : 设置zqpool的监听端口
  • listen_addr = * : 设置zqpool的监听IP,设置为*,表示在本地的所有IP地址上监听
  • mgr_port = 9380 : 管理端口
  • mgr_addr = * : 管理端口监听的地址

各个连接池的配置:

  • pool.1.fe_max_conns = 3000
  • pool.1.fe_user=u01
  • pool.1.fe_passwd=u02
  • pool.1.fe_dbname=mydb
  • pool.1.be_user=u01
  • pool.1.be_passwd=u01
  • pool.1.be_dbname=postgres
  • pool.1.be_conns = 10
  • pool.1.be_ipport=172.22.224.10:5432,172.22.224.10:5411
  • pool.1.be_conn_life_time=60 # 指定连接的life_time,当连接超过这个时间后,会被销毁重连,主要是为了防止内存泄漏

上面的pool.1代表第一个连接池,还可以有pool.2、pool.3等多个连接池。pool.1.be_ipport后面可以配置多个IP地址端口,以逗号分隔,如果配置了多个则随机均衡到后面的多个IP地址上。

启动zqpool:

[codetest@pgdev zqpool]$ ./zqpool
2022/05/24 09:12:30 server.go:2188: Starting server on :5436 ...

在另一个窗口中,使用psql连接zqpool的5436端口:

[codetest@pgdev zqpool]$ /usr/pgsql-10/bin/psql -h 172.22.224.10 -p 5436 -Uu01 -d postgres
Password for user u01:
psql (10.20, server 10.5)
Type "help" for help.


postgres=> \d
         List of relations
 Schema |  Name  | Type  |  Owner
--------+--------+-------+----------
 public | test01 | table | postgres
(1 row)

postgres=> select * from test01;
 id | t
----+---
(0 rows)

postgres=> insert into test01 values(1, '111'),(2,'222'),(3,'333');
INSERT 0 3
postgres=> select * from test01;
 id |  t
----+-----
  1 | 111
  2 | 222
  3 | 333
(3 rows)

可以为一个连接池增加一个后端数据库

curl -X POST -d "pool_name=u01.mydb&db_portal=172.22.224.10:5411" http://127.0.0.1:9380/api/v1/pool_add_be_db

或移除一个后端数据库

curl -X POST -d "pool_name=u01.mydb&db_portal=172.22.224.10:5432" http://127.0.0.1:9380/api/v1/pool_remove_be_db

查看一个连接池的后端数据库列表:

curl -X POST -d "pool_name=u01.mydb&db_portal=172.22.224.10:5432" http://127.0.0.1:9380/api/v1/pool_list_be_db

监控指标

ZQPool 提供了基于 Prometheus 的 Exporter。

在配置文件中指定 Exporter 端口: exporter_port=9816 # 指定 Prometheus 监控端口, 即 ZQPool 中 Exporter 暴露数据的端口

标签: pool_id 即配置文件中: pool.x.y 的 x
比如:

# pool_id=1
pool.1.fe_max_conns = 3000
pool.1.fe_user=kuafu
指标名称 说明 状态
zqpool_backend_connections 后端连接数,记录了每个连接池的后端连接数目。
zqpool_active_backend_connections 活跃后端连接数,记录了每个连接池的活跃后端连接数目。
zqpool_frontend_connections 前端连接数,记录了每个连接池的前端连接数目。
zqpool_active_frontend_connections 活跃前端连接数,记录了每个连接池的活跃前端连接数目。
zqpool_total_requests 请求总数,记录了每个连接池的请求总数。
zqpool_total_simple_queries 简单查询总数,记录了每个连接池的简单查询总数。
zqpool_total_extended_queries 扩展查询总数,记录了每个连接池的扩展查询总数。
zqpool_backend_connection_limit_reached_times 记录了每个连接池的后端连接数被占满的次数。

PostgreSQl 14版本使用注意

目前ZQPool还不支持SCRAM-SHA-256的密码验证方式。而PostgreSQL 14版本默认使用SCRAM-SHA-256的密码验证方式,而不再是md5,所以当后端的数据库版本是14时或后端用户的验证方式SCRAM-SHA-256时,会报如下错误:

[codetest@pgdev src]$ ./zqpool
2023-02-20T21:27:00.509+0800    INFO    mgrhttp/mgrhttp.go:111  Manager http Listen :9380
2023-02-20T21:27:00.510+0800    INFO    poolserver/poolserver.go:254    Only support md5(type=5) and trust(type=0), can not support type = 10

这时我们可以手工把用户的验证方式改成md5,方法如下:

set password_encryption to md5;
alter user u01 password 'u01';

检查是否生效:

postgres=#  select rolname,rolpassword from pg_authid where rolname='u01';
 rolname |             rolpassword
---------+-------------------------------------
 u01     | md5a3ece78fbd8f6411afb3ae35253c960c
(1 row)

上面rolpassword这一列中的密码如果是以md5开头的则是md5的密码验证方式,如果是SCRAM-SHA-256开头的,说明还是SCRAM-SHA-256的验证方式。

参考

jdbc中多地址配置

可以参见:

https://jdbc.postgresql.org/documentation/use/#connection-fail-over

技术交流群

如需要交流或技术支持,请加扫描乘数小助手的二维码并加其为好友,然后由乘数小助手拉您进入微信交流群中 :

乘数小助手

在此支持群中,可以获得ZQPool的社区支持以及一些最新的消息。

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

TODO

  1. 支持copy协议
  2. 增加性能统计信息
  3. 支持读写分离,支持后端是polardb for postgresql的读写分离功能。
  4. 支持更多的配置项
  5. 支持一些管理命令
  6. 支持ssl协议
  7. 支持SCRAM-SHA-256的密码验证
木兰公共许可证, 第2版 木兰公共许可证, 第2版 2021年5月 http://license.coscl.org.cn/MulanPubL-2.0 您对“贡献”的复制、使用、修改及分发受木兰公共许可证,第2版(以下简称“本许可证”)的如下条款的约束: 0. 定义 “贡献” 是指由“贡献者”许可在“本许可证”下的受版权法保护的作品,包括最初“贡献者”许可在“本许可证”下的作品及后续“贡献者”许可在“本许可证”下的“衍生作品”。 “贡献者” 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。 “法人实体” 是指提交贡献的机构及其“关联实体”。 “关联实体” 是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的“控制”是指拥有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 “衍生作品” 是指基于“贡献”创作的作品,具体包括对全部或部分“贡献”进行修改、重写、翻译、注释、组合或与之链接(包括动态链接或静态链接)而形成的作品。仅与“贡献”进行进程间通信或系统调用的作品是独立作品,不属于“衍生作品”。 “对应源代码” 是指生成、安装和(对于可执行作品)运行目标代码所需的所有源文件和与之关联的接口定义文件,以及控制这些活动的脚本,但不包括编译环境、编译工具、云服务平台(如果有)。 “分发” 是指通过任何媒介向他人提供“贡献”或“衍生作品”的行为,以及利用“贡献”或“衍生作品”通过网络远程给用户提供服务的行为,例如:通过利用“贡献”或“衍生作品”搭建的云服务平台提供在线服务的行为。 1. 授予版权许可 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、“分发”其“贡献”或“衍生作品”,不论修改与否。 2. 授予专利许可 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销的情形除外)专利许可,供您使用、制造、委托制造、销售、许诺销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”中的专利权利要求,而不包括仅因您对“贡献”的修改而将必然会侵犯到的专利权利要求。如果您或您的“关联实体”直接或间接地,就“贡献”对任何人发起专利侵权诉讼(包括在诉讼中提出反诉请求或交叉请求)或发起其他专利维权行动,则“贡献者”根据“本许可证”授予您的专利许可自您发起专利诉讼或专利维权行动之日终止。 3. 无商标许可 “贡献者”在“本许可证”下不提供对其商品名称、商标、服务标识或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用的情形除外。 4. 分发限制 您可以将您接收到的“贡献”或您的“衍生作品”以源程序形式或可执行形式重新“分发”,但必须满足下列条件: (1)您必须向接收者提供“本许可证”的副本,并保留“贡献”中的版权、商标、专利及免责声明;并且, (2)如果您“分发”您接收到的“贡献”,您必须使用“本许可证”提供该“贡献”的源代码副本;如果您 “分发”您的“衍生作品”,您必须: (i)随“衍生作品”提供使用“本许可证”“分发”的您的“衍生作品”的“对应源代码”。如果您通过下载链接提供前述“对应源代码”,则您应将下载链接地址置于“衍生作品”或其随附文档中的明显位置,有效期自该“衍生作品”“分发”之日起不少于三年,并确保接收者可以获得“对应源代码”;或者, (ii)随“衍生作品”向接收者提供一个书面要约,表明您愿意提供根据“本许可证”“分发”的您“衍生作品”的“对应源代码”。该书面要约应置于“衍生作品”中的明显位置,并确保接收者根据书面要约可获取“对应源代码”的时间从您接到该请求之日起不得超过三个月,且有效期自该“衍生作品”“分发”之日起不少于三年。 5. 违约与终止 如果您违反“本许可证”,任何“贡献者”有权书面通知您终止其根据“本许可证”授予您的许可。该“贡献者”授予您的许可自您接到其终止通知之日起终止。仅在如下两种情形下,即使您收到“贡献者”的通知也并不终止其授予您的许可: (1)您在接到该终止通知之前已停止所有违反行为; (2)您是首次收到该“贡献者”根据“本许可证”发出的书面终止通知,并且您在收到该通知后30天内已停止所有违反行为。 只要您下游的接收者遵守“本许可证”的相关规定,即使您在“本许可证”下被授予的许可终止,不影响下游的接收者根据“本许可证”享有的权利。 6. 例外 如果您将“贡献”与采用GNU AFFERO GENERAL PUBLIC LICENSE Version 3(以下简称“AGPLv3”)或其后续版本的作品结合形成新的“衍生作品”,且根据“AGPLv3”或其后续版本的要求您有义务将新形成的“衍生作品”以“AGPLv3”或其后续版本进行许可的,您可以根据“AGPLv3”或其后续版本进行许可,只要您在“分发”该“衍生作品”的同时向接收者提供“本许可证”的副本,并保留“贡献”中的版权、商标、专利及免责声明。但任何“贡献者”不会因您选择“AGPLv3”或其后续版本而授予该“衍生作品”的接收者更多权利。 7. 免责声明与责任限制 “贡献”在提供时不带有任何明示或默示的担保。在任何情况下,“贡献者”或版权人不对任何人因使用“贡献”而引发的任何直接或间接损失承担任何责任,不论该等损失因何种原因导致或者基于何种法律理论,即使其曾被告知有该等损失的可能性。 8. 语言 “本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何不一致,以中文版为准。 条款结束 如何将木兰公共许可证,第2版,应用到您的软件 如果您希望将木兰公共许可证,第2版,应用到您的软件,为了方便接收者查阅,建议您完成如下三步: 1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字; 2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中; 3, 请将如下声明文本放入每个源文件的头部注释中。 Copyright (c) [Year] [name of copyright holder] [Software Name] is licensed under Mulan PubL v2. You can use this software according to the terms and conditions of the Mulan PubL v2. You may obtain a copy of Mulan PubL v2 at: http://license.coscl.org.cn/MulanPubL-2.0 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PubL v2 for more details. Mulan Public License,Version 2 Mulan Public License,Version 2 (Mulan PubL v2) May 2021 http://license.coscl.org.cn/MulanPubL-2.0 Your reproduction, use, modification and Distribution of the Contribution shall be subject to Mulan Public License, Version 2 (this License) with following terms and conditions: 0. Definition Contribution means the copyrightable work licensed by a particular Contributor under this License, including the work licensed by the initial Contributor under this License and its Derivative Work licensed by any subsequent Contributor under this License. Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License. Legal Entity means the entity making a Contribution and all its Affiliates. Affiliates mmeans entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity. Derivative Work means works created based on Contribution, specifically including works formed by modifying, rewriting, translating, annotating, combining or linking to all or part of Contribution (including dynamic linking or static linking). Works which only communicate with Contribution through inter-process communication or system call, are independent works, rather than Derivative Work. Corresponding Source Code means all the source code needed to generate, install, and (for an executable work) run the object code including the interface definition files associated with source files for the work, and scripts to control those activities, excluding of compilation environment and compilation tools, cloud services platform (if any). Distribute (or Distribution) means the act of making the Contribution or Derivative Work available to others through any medium, and using the Contribution or Derivative Work to provide online services to users, such as the act of providing online services through a cloud service platform built using Contributions or Derivative Works. 1. Grant of Copyright License Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or Distribute its Contribution or Derivative Work, with modification or not. 2. Grant of Patent License Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to use, make, have made, sell, offer for sale, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, excluding of any patent claims solely be infringed by your modification. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that any Contribution infringes patents, then any patent license granted to you under this License for the Contribution shall terminate as of the date such litigation or activity is filed or taken. 3. No Trademark License No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in Section 4. 4. Distribution Restriction You may Distribute the Contribution you received or your Derivative Work, whether in source or executable forms, provided that you meet the following conditions: 1) You must provide recipients with a copy of this License and retain copyright, trademark, patent and disclaimer statements in the Contribution; and, 2) If you Distribute the Contribution you received, you must provide copies of the Contribution’s source code under this License; If you Distribute your Derivative Work, you have to: (i) accompanying the Derivative work, provide recipients with Corresponding Source Code of your Derivative Work under this License. If you provide the Corresponding Source Code through a download link, you should place such link address prominently in the Derivative Work or its accompanying documents, and be valid no less than three years from your Distribution of the particular Derivative Work, and ensure that the recipients can acquire the Corresponding Source Code through the link; or, (ii) accompanying the Derivative Work, provide recipients with a written offer indicating your willingness to provide the Corresponding Source Code of the Derivative Work licensed under this License. Such written offer shall be placed prominently in the Derivative Work or its accompanying documents. Without reasonable excuse, the recipient shall be able to acquire the Corresponding Source code of the Derivative work for no more than three months from your receipt of a valid request, and be valid no less than three years from your Distribution of the particular Derivative Work. 5. Breach and Termination If you breach this License, any Contributor has the right to notify you in writing to terminate its license granted to you under this License. The license granted to you by such Contributor terminates upon your receipt of such notice of termination. Notwithstanding the foregoing, your license will not be terminated even if you receive a notice of termination from Contributor, provided that: 1) you have cured all the breaches prior to receiving such notice of termination; or, 2) it’s your first time to receive a notice of termination from such Contributor pursuant to this License, and you have cured all the breaches within 30 days of receipt of such notice. Termination of your license under this License shall not affect the downstream recipient's rights under this License, provided that the downstream recipient complies with this License. 6. Exceptions If you combine Contribution or your Derivative Work with a work licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 (hereinafter referred to as “AGPLv3”) or its subsequent versions, and according to the AGPLv3 or its subsequent versions, you have an obligation to make the combined work to be licensed under the corresponding license, you can license such combined work under the license, provided that when you Distribute the combined work, you also provide a copy of this License to the recipients, and retain copyright, trademarks, patents, and disclaimer statements in the Contribution. No Contributor will grant additional rights to the recipients of the combined work for your license under AGPLv3 or its subsequent versions. 7. Disclaimer of Warranty and Limitation of liability CONTRIBUTION ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE CONTRIBUTION, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 8. Language THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL. END OF THE TERMS AND CONDITIONS How to apply the Mulan Public License,Version 2 (Mulan PubL v2), to your software To apply the Mulan Public License,Version 2 to your work, for easy identification by recipients, you are suggested to complete following three steps: Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner; Create a file named “LICENSE” which contains the whole context of this License in the first directory of your software package; Attach the statement to the appropriate annotated syntax at the beginning of each source file. Copyright (c) [Year] [name of copyright holder] [Software Name] is licensed under Mulan PubL v2. You can use this software according to the terms and conditions of the Mulan PubL v2. You may obtain a copy of Mulan PubL v2 at: http://license.coscl.org.cn/MulanPubL-2.0 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PubL v2 for more details.

简介

ZQPool是中启乘数科技发布的PostgreSQL数据的开源连接池软件。主要解决流行的连接池软件pgbouncer的如下两个缺点: 1. 解决jdbc程序使用pgbouncer连接池无法减少数据库上连接数的问题; 2. pgbouncer不能利用到CPU的多核,当对高并发的情况下,处理能力超过了单核的能力时,性能就再也上不去了。 展开 收起
MulanPubL-2.0
取消

发行版 (4)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/csudata/zqpool.git
git@gitee.com:csudata/zqpool.git
csudata
zqpool
zqpool
master

搜索帮助