aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/httpsys.cpp
Commit message (Collapse)AuthorAgeFilesLines
* restructured zenhttp (#472)Stefan Boberg2023-10-131-2012/+0
| | | separating the http server implementations into a directory and moved diagsvcs into zenserver since it's somewhat hard-coded for it
* Merge remote-tracking branch 'origin/main' into zs/default-port-changeStefan Boberg2023-10-121-14/+68
|\
| * adjust resource usage for dedicated servers (#466)Stefan Boberg2023-10-121-14/+68
| | | | | | | | | | | | | | | | | | when dedicated mode is enabled via `--dedicated` or `server.dedicated` then we tune http.sys server settings to be more suitable for a shared server initially we tune two things * the thread pool used to service I/O requests allows a larger number of threads to be created when needed. The minimum thread count is unchanged but in dedicated server mode we double the maximum number of threads allowed * the http.sys request queue length (`HttpServerQueueLengthProperty`) is increased to 50,000 in dedicated mode. The regular default is 1,000
* | Change default port to 8558zousar2023-10-111-1/+1
|/ | | | Changes the default port without altering config for shared instances.
* pluggable asio transport (#460)Stefan Boberg2023-10-111-1/+87
| | | | | | | | | added pluggable transport based on asio. This is in an experimental state and is not yet a replacement for httpasio even though that is the ultimate goal also moved plugin API header into dedicated part of the tree to clarify that it is meant to be usable in isolation, without any dependency on zencore et al moved transport implementations into dedicated source directory in zenhttp note that this adds code to the build but nothing should change at runtime since the instantiation of the new code is conditional and is inactive by default
* reduce time spent holding http.sys transaction lock (#437)Stefan Boberg2023-10-021-14/+25
| | | | | * changed where calls to IssueNewRequestMaybe are made to reduce per-transaction lock contention * minor: reduce stack frame for HttpSysTransaction::IoCompletionCallback
* Handle OOM and OOD more gracefully to not spam Sentry with error reports (#434)Dan Engelbrecht2023-10-021-2/+15
| | | | | | - Improvement: Catch Out Of Memory and Out Of Disk exceptions and report back to reqeuster without reporting an error to Sentry - Improvement: If creating bucket fails when storing and item in the structured cache, log a warning and propagate error to requester without reporting an error to Sentry - Improvement: Make an explicit flush of the active block written to in blockstore flush - Improvement: Make sure cache and cas MakeIndexSnapshot does not throw exception on failure which would cause and abnormal termniation at exit
* added handle to http.sys error response logging (#432)Stefan Boberg2023-09-291-2/+3
| | | * added handle to http.sys error response logging
* added more context to http response error message (#430)Stefan Boberg2023-09-281-10/+77
| | | when a http.sys request response API call fails, we now include more information including metadata about the contents of the reponse (i.e memory/file references including file names/size and chunk offsets/size) to help track down some odd error conditions seen in production
* prefer to handle cache RPC requests synchronously (#428)Stefan Boberg2023-09-271-1/+22
| | | | | * only handle RPC requests in a worker thread if we have an upstream. we may as well handle the request inline on the http_io thread if we're only dealing with local data since the response times should be pretty consistent in that case * http.sys: don't create async worker thread pool until it's needed (typically only if we have an upstream)
* added name to http.sys request queue (#417)Stefan Boberg2023-09-221-1/+33
| | | | | | * added name to http.sys request queue * changed so that rejected requests are answered with a 403 response instead of just dropping the connection
* add more trace scopes (#362)Dan Engelbrecht2023-09-151-1/+12
| | | | | * more trace scopes * Make sure ReplayLogEntries uses the correct size for oplog buffer * changelog
* bugfix: http.sys async response handling race (#406)Stefan Boberg2023-09-151-1/+14
| | | | under heavy load, an async response could end up deleting the HTTP transaction object before the issuing call had completed
* http and httpsys config options (#401)Dan Engelbrecht2023-09-141-10/+6
| | | | * Added `--http-threads`, `--httpsys-async-work-threads`, `--httpsys-enable-request-logging` and `--httpsys-enable-async-response` command line options to zenserver * remove unused CreateHttpSysServer
* added some top-level trace scopes to httpsys implStefan Boberg2023-05-151-0/+5
|
* all threads should be named (#304)Stefan Boberg2023-05-151-2/+20
| | | | | | | * added WorkerThreadPool naming, packaged_task support * name the http.sys thread pool service threads * added http.sys I/O threadpool naming * upstream cache I/O thread naming
* Close down http server gracefully when exiting even while requests are still ↵Dan Engelbrecht2023-05-111-0/+10
| | | | | being processed (#290) * Close down http server gracefully when exiting even while requests are still being processed
* moved source directories into `/src` (#264)Stefan Boberg2023-05-021-0/+1674
* moved source directories into `/src` * updated bundle.lua for new `src` path * moved some docs, icon * removed old test trees