Skip to content

A functionless MySQL proxy that exacerbates QPS badly XDD

Notifications You must be signed in to change notification settings

alyoshark/resty-mysql-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenResty MySQL Proxy

This is a work-in-progress

Here is the installation guide

This project has largely copied (then trimmed) chunks of code from lua-resty-mysql.

The sniffer proxy holds:

  • A socket to upstream MySQL connection
  • A socket to downstream client connection

And it simply receives from one socket and sends the content to the other, with queries parsed and logged.

To test run the proxy in Docker Compose

  • Start docker-compose in a terminal to see the logs:
$ docker-compose up
  • Test connection
mysql -h0.0.0.0 -P6606 -uroot -papp app

TODO

  • MySQL commandline client login
  • MySQL commandline client query
  • Better timeout handling (it's now naively one hour)
  • Better syslog-ng setup (I don't know if it rotates)

About

A functionless MySQL proxy that exacerbates QPS badly XDD

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published