Giter Club home page Giter Club logo

poolproxy's Introduction

#poolproxy

Introduction

Pool Proxy 连接池代理是一个使用golang编写的简单连接池代理工具

该工具提供了连接池功能,并可设置最大连接数、连接最大空闲时间、定时检测并断开空闲连接

该工具提供了一个透明的代理接口,可以为下游程序提供带连接池的代理功能

TODO

目前仅实现了redis的代理功能

本地使用时,建议监听Unix domain socket 可以有效减少TCP握手消耗,提高系统性能

Scene

该工具适用于,无法通过自身实现连接池的语言

PHP

Installation

go get github.com/bjdgyc/poolproxy

Toml config

[options.redis]
    #日志文件
    logfile = ""
    # 代理监听设置
    # 可以设置为Unix socket
    # 如: /var/run/poolproxy.socket
    # 也可以设置为TCP端口
    addr = ":8080"
    read_timeout = 0
    write_timeout = 0
    pool_timeout = 0

    #远程连接设置
    raddr = "192.168.56.102:6379"
    ruser = ""
    rpass = ""
    rpool_size = 0
    # 获取空闲连接的排队超时时间(秒)
    ridle_timeout = 0
    # 定期检测空闲连接的时间(秒)
    ridle_check_frequency = 120
    

Start

go build && ./poolproxy -c ./config.toml

poolproxy's People

Contributors

bjdgyc avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.