Commit Graph

37 Commits

Author SHA1 Message Date
kirill reshke b546551bb8
do not hold repilation connections while online restart + drop conn rate logic (#266)
* do not hold repilation connections while online restart

* drop connection wtih rate (no more that 1 per sec)

* fix review

* eject info per-server

* use per thread global state to smoothly eject old connection

Co-authored-by: reshke <Kirill Reshke>
2021-01-23 18:49:54 +05:00
kirill reshke b071fd1633
do not find openssl package when it explicitly provided, also make use scram optional (#257)
Co-authored-by: reshke <Kirill Reshke>
2021-01-11 14:13:02 +05:00
Daniil Zakhlystov e97f7e1f1c
Add compression toggle to config, cmake && Add dependencies to BuildDebian (#234)
* Add compression option to config

* Add BUILD_COMPRESSION option to cmake

* Escape identifiers

* Add preprocessing directives for OD_BUILD_COMPRESSION

* Add dependencies for BuildDebian

* apply fmt

Co-authored-by: root <root@ubuntu-build-machine.ru-central1.internal>
2020-11-23 16:55:42 +05:00
Daniil Zakhlystov 222da0c70a
Implement libpq compression (#230)
* Add zlib and zstd to cmake

* Add zpq_stream to machinarium

--
zpq_stream is used for streaming compression/decompression of Postgres protocol

* Add zpq_stream-related functions to machinarium

* Add compression set/free/read/write logic to machinarium

* Add startup packet compression var to kiwi

* Add compression_ack backend message support for kiwi

* Add compression setup logic for main odyssey project

* apply fmt

* fix format #2

Co-authored-by: root <root@ubuntu-build-machine.ru-central1.internal>
2020-11-23 13:22:17 +05:00
kirill reshke 129ec0be83
fix scram, use postgresql 13 in build & tests (#223)
* fix scram, use postgresql 13 in build & tests

* move scram test inside docker

Co-authored-by: reshke <Kirill Reshke>
2020-10-26 10:00:17 +05:00
kirill reshke 7135f2f0c8
fix CI (#213)
Co-authored-by: reshke <Kirill Reshke>
2020-10-16 21:30:45 +05:00
reshke 52b0abb647 fix infinte loop + add signals tests 2020-08-10 13:39:09 +05:00
reshke f030093484 use SO_REUSEPORT to graceful shutdown 2020-08-10 13:39:09 +05:00
kirill reshke 66c1c63751
odyssey erros stats (#187) 2020-07-08 11:26:17 +05:00
kirill reshke 41a5449969
odyssey modules (#156) 2020-06-09 14:19:11 +05:00
lowgear 1d5d1b5c21
treat buffer respecting size (1) (#160) 2020-06-09 11:51:13 +05:00
Georgy Rylov b51317b254
t-digest for latencies (#147) 2020-05-28 11:12:10 +05:00
efimkin 60d7229cdc Enhance settings for replication support (#107) 2020-01-27 18:01:53 +05:00
Andrey Borodin 507682fdd5
Quantiles for transactions and queries (#95) 2020-01-24 17:31:15 +05:00
Dima Starkov a8ca664a63 Implements SCRAM Authentication (#73) 2019-11-11 12:28:50 +03:00
Dmitry Simonenko c6542d7003 odyssey: post merge fixes 2019-09-27 16:47:45 +03:00
reshke debfd09d8e Add PAM auth support 2019-09-26 13:54:53 +05:00
Andrey Borodin 76ec3581a1
Use pg_lrand48 for portability (#48) 2019-01-30 14:30:31 +05:00
Dmitry Simonenko 6c0a1f09f8 odyssey: major rework of io architecture
This patch intend is to improve overall io performance, reduce
cpu and system usage.

Machinarium:

IO read/write logic is highly simplified and now based on conditions
instead of previously made internal readahead buffer and msg
queues. This allows to give user more control over io operations and
avoid doing undesired readahead copying.

Above that, TLS implementation reworked to use async logic instead of
separate BIO layer.

Direct pooling functions removed.

New objects machine_cond_t and machine_iov_t objects.

Odyssey:

Introduced readahead, io and relay objects.

Relay allows to connect two io handles for direct data retransmission
without double copying.

Removed configuration options no longer needed:
packet_read_size, packet_write_queue
2019-01-23 18:43:52 +03:00
Dmitry Simonenko 2e03af9c88 odyssey: major router and shared logic rework
Goal is to improve overall performance during massive peaks
of connecting clients.

This patch makes router a shared structure, instead of
being run in separate system worker thread/coroutine.

Now router and each route object is protected by
separate mutex. Worker threads directly access router object
without calls to separate thread.
2018-12-06 17:23:15 +03:00
Dmitry Simonenko da7e6ea7a5 odyssey: major io rework and refactoring
This patch moves Odyssey from stream based write caching
to message driven. All write operations are delayed
and happen on a group of messages.

This removes necessity to do IO and wait for write completion during calls
from SSL_write() context. Write timings should behave more predictable now and
number of used syscalls should be also decreased.

This patch also simplifies caching management. All clients are simply
reusing cached messages without prolonged contention.

Several configuration options are no longer used:
pipeline, cache, cache_chunk
2018-08-28 17:43:46 +03:00
Dmitry Simonenko 9fcf2a4a80 odyssey: remake pooler service as system 2018-03-13 16:26:04 +03:00
Dmitry Simonenko bb826db7e8 odissey: major scheme rework, rename it to config 2018-03-06 18:23:52 +03:00
Dmitry Simonenko 4df9f8e760 odissey: move config to config_reader 2018-03-05 17:24:30 +03:00
Dmitry Simonenko 99fca366ef odissey: rename periodic service to cron 2018-03-02 16:12:32 +03:00
Dmitry Simonenko d48cd092a0 odissey: relay and relay_pool is worker and worker_pool now 2018-03-02 13:00:52 +03:00
Dmitry Simonenko 6dacad6fcb odissey: rework reset to send discard-configuration altogether 2018-01-24 17:28:48 +03:00
Dmitry Simonenko fdd39f76e6 odissey: move auth_query impl into separate file 2017-09-29 13:57:53 +03:00
Dmitry Simonenko 7e217b3b5a odissey: major logging rework (introduce log format) 2017-09-21 16:44:19 +03:00
Dmitry Simonenko ab95c11fff odissey: reorganize backend reset implementation 2017-09-05 16:34:29 +03:00
Dmitriy Sarafannikov ddc1d0a06b Debian package infrastructure
Package includes configuration files for odissey itself,
logrotate, init script. All of them generated by CMake
from templates placed in etc/ directory and added to
install section of Makefile which will be called by
debuild or another deb package building utilities.
2017-08-21 15:18:28 +03:00
Dmitry Simonenko f28b38bc1a odissey: major logger rework 2017-07-26 17:05:29 +03:00
Dmitry Simonenko 3197d7cf22 odissey: add syslog logsystem implementation 2017-07-26 14:31:56 +03:00
Dmitry Simonenko d02e2c20be odissey: configuration parser major rework 2017-07-12 17:09:48 +03:00
Dmitry Simonenko a3495b3001 odissey: rename odissey.c into main.c 2017-07-05 15:19:04 +03:00
Dmitry Simonenko 9e096b96b2 odissey: rework file naming and include path 2017-07-05 15:15:17 +03:00
Dmitry Simonenko 660f00c316 odissey: move src to sources 2017-06-28 14:52:38 +03:00