Scalable PostgreSQL connection pooler
Go to file
Dmitry Simonenko 5b8cdfbe6e odissey: fix client unroute during setup pool attach timeout 2017-11-20 17:11:44 +03:00
cmake odissey: fix out-of-source shapito build 2017-10-03 17:07:19 +03:00
debian Debian package infrastructure 2017-08-21 15:18:28 +03:00
scripts/debian odissey: reduce default size of readahead and pipelining 2017-11-13 17:14:27 +03:00
sources odissey: fix client unroute during setup pool attach timeout 2017-11-20 17:11:44 +03:00
third_party odissey: update machinarium 2017-11-17 17:44:04 +03:00
.gitignore odissey: rework file naming and include path 2017-07-05 15:15:17 +03:00
.gitmodules odissey: move submodules from lib/ to third_party/ 2017-07-04 16:36:32 +03:00
AUTHORS odissey: add Dmitry Sarafannikov to AUTHORS file 2017-08-21 17:26:32 +03:00
CMakeLists.txt odissey: put add_subdirectory(sources) back 2017-08-21 17:50:22 +03:00
INTERNALS.md odissey: update INTERNALS.md 2017-07-31 17:50:20 +03:00
LICENSE odissey: add AUTHORS and LICENSE files 2016-11-07 12:52:56 +03:00
README.md odissey: update documentation 2017-07-18 17:06:53 +03:00
odissey.conf odissey: reduce default size of readahead and pipelining 2017-11-13 17:14:27 +03:00

README.md

Odissey

Advanced multi-threaded PostgreSQL connection pooler and request router.

Design goals and main features

Multi-threaded architecture

Odissey can significantly scale processing performance by specifying a number of additional worker threads. Each worker thread is responsible for authentication and proxying client-to-server and server-to-client requests. All worker threads are sharing global server connection pools. Multi-threaded design plays important role in SSL/TLS performance.

Advanced transactional pooling

Odissey tracks current transaction state and in case of unexpected client disconnection can emit automatic Cancel connection and do Rollback of abandoned transaction, before putting server connection back to the server pool for reuse. Additionally, last server connection owner client is remembered to reduce a need for Discard and Setting up client options on each client-to-server assignment.

Better pooling control

Odissey allows to define connection pools as a pair of Database and User. Each defined pool can have separate authentication, pooling mode and limits settings.

Pipelining and network optimizations

Odissey allows to reduce network IO calls by logically buffer several server replies before sending them to the client. Additionally client-to-server and server-to-client buffers are zero-copy.

Authentication

Odissey has full-featured SSL/TLS support and common authentication methods like: md5 and clear text both for client and server authentication. Additionally it allows to block each pool user separately.

Logging

Odissey generates universally unique identifiers uuid for client and server connections. Any log events and client error responces include the id, which then can be used to uniquely identify client and track actions. Odissey can save log events into log file and using system logger.

Internals

Odissey has sophisticated asynchonous multi-threaded architecture which is driven by custom made coroutine engine: machinarium. Main idea behind coroutine design is to make event-driven asynchronous applications to look and feel like being written in synchronous-procedural manner instead of using traditional callback approach.

One of the main goal was to make code base understandable for new developers and to make an architecture easily extensible for future development.

More information: Architecture and internals.

Build instructions

git clone --recursive git://github.yandex-team.ru/pmwkaa/odissey.git
cd odissey
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make