Commit Graph

56 Commits

Author SHA1 Message Date
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 9e0152417f odyssey: rework and optimize parameters setting logic 2018-12-13 14:18:20 +03:00
Dmitry Simonenko 9d6dea5d92 odyssey: major parameter settings optimization 2018-12-12 16:07:25 +03:00
Dmitry Simonenko 0504a34b52 odyssey: rework pool wait logic and refactor client notification 2018-12-07 15:12:06 +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 fbc037aa23 odyssey: implement packet retransmission in chunks; packet_read_size 2018-10-23 16:51:30 +03:00
Dmitry Simonenko 6f6df24ab1 odyssey: add route obsolete 2018-09-18 18:17:04 +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 f7a4438ec1 odyssey: move stats out of server_t 2018-08-02 16:38:36 +03:00
Dmitry Simonenko ae0aed8a55 odyssey: do not force to have default database and user. #19 2018-06-08 18:28:07 +03:00
Dmitry Simonenko 5ca3fa926a odyssey: update source file headers 2018-04-04 16:19:58 +03:00
Dmitry Simonenko 38430a9d51 odyssey: remove config versioning 2018-03-21 17:36:57 +03:00
Dmitry Simonenko 9fcf2a4a80 odyssey: remake pooler service as system 2018-03-13 16:26:04 +03:00
Dmitry Simonenko 20a092098e odyssey: remake system_t as global_t 2018-03-13 16:17:27 +03:00
Dmitry Simonenko f108dcba09 odyssey: project rename 2018-03-12 17:03:15 +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 a19f18cef1 odissey: rework router cancel logic 2018-02-22 16:43:52 +03:00
Dmitry Simonenko c29197a838 odissey: update machinarium 2018-02-19 15:43:22 +03:00
Dmitry Simonenko 9d944b51f4 odissey: move server connection close out of pooler 2018-02-15 16:06:46 +03:00
Dmitry Simonenko f11a98432f odissey: rework server buffering using client stream 2018-02-13 16:33:40 +03:00
Dmitry Simonenko 0cc0f949b3 odissey: make server stream shared driven by attach/detach logic 2018-02-12 16:29:40 +03:00
Dmitry Simonenko a4ea499813 odissey: make sure server is connected before terminate 2018-02-07 12:56:51 +03:00
Dmitry Simonenko 26efd303d1 odissey: avoid io attach/detach for non shared instance 2018-02-02 16:53:24 +03:00
Dmitry Simonenko b0635265a1 odissey: move is_shared logic to instance domain 2018-02-02 16:44:47 +03:00
Dmitry Simonenko 645f7e2350 odissey: create non shared channel for workers=1 2018-02-02 16:09:26 +03:00
Dmitry Simonenko 17673c123a odissey: rework internal services init logic 2018-02-02 15:50:23 +03:00
Dmitry Simonenko 981a4c6626 odissey: update to latest machinarium changes 2018-02-02 14:49:10 +03:00
Dmitry Simonenko 57f6df77c7 odissey: do retry in and separate frontend attach logic 2017-12-08 16:30:42 +03:00
Dmitry Simonenko 20173a64b2 odissey: give more details on pool wait timedout 2017-11-30 17:24:50 +03:00
Dmitry Simonenko 7991ee0fb0 odissey: use copy safe od_snprintf() implementation 2017-11-27 15:54:16 +03:00
Dmitry Simonenko c2c1fd7e90 odissey: make it possible to disable pool_size limit 2017-11-23 16:27:16 +03:00
Dmitry Simonenko 4d84a41f7e odissey: change log verbosity for timedout and close events 2017-11-23 15:23:14 +03:00
Dmitry Simonenko 0dd047349a odissey: properly handle pool_timeout = 0 2017-11-20 16:14:08 +03:00
Dmitry Simonenko 7e217b3b5a odissey: major logging rework (introduce log format) 2017-09-21 16:44:19 +03:00
Dmitry Simonenko 0b6cc63f28 odissey: properly decr client count after reset/unroute 2017-09-18 17:04:53 +03:00
Dmitry Simonenko 5b29494781 odissey: implement detached error object 2017-09-15 16:08:42 +03:00
Dmitry Simonenko 610cf23c7c odissey: reorder instance.h inclusion 2017-09-15 15:58:29 +03:00
Dmitry Simonenko 1f8ddf885e odissey: update file includes 2017-08-08 16:50:50 +03:00
Dmitry Simonenko f28b38bc1a odissey: major logger rework 2017-07-26 17:05:29 +03:00
Dmitry Simonenko 65b740bb3c odissey: log current routes after config reload 2017-07-24 15:06:18 +03:00
Dmitry Simonenko 8d0aafbccc odissey: rename routepool_match to routepool_match_latest 2017-07-24 14:21:32 +03:00
Dmitry Simonenko 9b04c82a8f odissey: major configuration scheme rework 2017-07-21 17:29:01 +03:00
Dmitry Simonenko 578d2fdca8 odissey: rework db scheme route reference and gc 2017-07-19 18:25:44 +03:00
Dmitry Simonenko 617cba402a odissey: make mandatory default database and user 2017-07-18 15:41:00 +03:00
Dmitry Simonenko a9969ca1ca odissey: add scheme obsolete logic 2017-07-17 17:05:46 +03:00
Dmitry Simonenko ac1f5c14b5 odissey: match storage and db scheme by version 2017-07-14 16:55:01 +03:00