Scalable PostgreSQL connection pooler
Go to file
lowgear b426f4f301 Add pause/resume admin console commands[fork of tomlikestorock's PR] (#66) 2019-11-11 11:37:09 +03:00
cmake odyssey: post merge fixes 2019-09-27 16:47:45 +03:00
debian Debian package infrastructure 2017-08-21 15:18:28 +03:00
docker Local development inside docker 2019-10-08 11:15:37 +05:00
documentation Add PAM auth support 2019-09-26 13:54:53 +05:00
scripts Add libpam-dev to dependencies 2019-10-15 18:18:52 +03:00
sources Add pause/resume admin console commands[fork of tomlikestorock's PR] (#66) 2019-11-11 11:37:09 +03:00
stress Restore odyssey_stress 2019-04-29 14:01:15 +05:00
test Use only one TLS context per machine 2019-11-11 10:31:52 +03:00
third_party Use only one TLS context per machine 2019-11-11 10:31:52 +03:00
.gitignore Local development inside docker 2019-10-08 11:15:37 +05:00
.gitmodules odyssey: remove machinarium as submodule 2018-03-29 14:20:50 +03:00
.travis.yml Remove branch restrictions from travis 2019-05-28 22:18:29 -04:00
AUTHORS Implement SHOW POOLS command 2018-12-24 17:37:40 +05:00
CMakeLists.txt odyssey: post merge fixes 2019-09-27 16:47:45 +03:00
LICENSE odyssey: update LICENSE and AUTHORS 2018-05-21 17:39:43 +03:00
README.md odyssey: post merge fixes 2019-09-27 16:47:45 +03:00
odyssey.conf Implement client_max_routing (#72) 2019-10-15 17:15:37 +03:00

README.md



Odyssey

Advanced multi-threaded PostgreSQL connection pooler and request router.

Project status

Although we run Odyssey in production, the project is currently in Beta. We appreciate any kind of feedback and contribution to the project.

Design goals and main features

Multi-threaded processing

Odyssey 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

Odyssey 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 setting up client options on each client-to-server assignment.

Better pooling control

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

Authentication

Odyssey 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

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

Architecture and internals

Odyssey has sophisticated asynchronous 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

Currently Odyssey runs only on Linux. Supported platforms are x86/x86_64.

To build you will need:

  • cmake >= 2.8
  • gcc >= 4.6
  • openssl
git clone git://github.com/yandex/odyssey.git
cd odyssey
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

Configuration reference

Service
Logging
Performance
System
Global limits
Listen
Routing
Storage
Database and user
Architecture and Internals