Easyproxy, easy-to-use TCP proxy

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Easyproxy, easy-to-use TCP proxy

Recently encountered in the work golang of the project, a little bit of interest in it, intends to seriously study, just in the building mysql of the main environment when found that if the use of an agent to test their own will be more convenient (mainly to build wheels), so this based on Golang tcp proxy The project produced

Demand

    1. Because it is to learn golang, we should use the basic knowledge of Golang as far as possible to implement the agent basic function.

    2. Not really simple to play, learn a thing in addition to enrich the brain, but also in order to have practical use, so it is necessary to engineering

    3. The program is not too complicated, after all, this is my first golang project, more days

Design

The structure diagram is as follows:

  +----------+ +------------+|            Client |<----+ |   |+----------+ +--->+-----+<-------->|                      Server |     |          |            |     |+----------+          |          |  +------------+|     Client |<-------->|     |+----------+          |                      |     |          |  +------------++----------+          |          L |            |  ||  Client |<-------->|   B |<-------->|  Server |+----------+ |          S |            |                      |     |          |     +------------++----------+          |  ||     Client |<-------->|     |+----------+          |          |     +------------+                      |          |            |   |+----------+ +--->+-----+<-------->|  Server | |            Client |<----+ | |+----------+                           +------------+            

The most common load-balancing mode, but there are several points that need to be supported:

    1. Support different scheduling strategies, such as: rotation, random, etc.

    2. Have a heartbeat check mechanism to remove the problematic backend server in a timely manner, but also to recover at the time of server recovery

    3. Simple monitoring for easy viewing of the backend server's agent situation and client connectivity

    4. Simple configuration file for easy modification

    5. ... Follow up and add ...

Realize

Github:easyproxy

Other

If you have any questions, please golang contact your other preferred partners:xsank#foxmmail.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.