eosnetworkfoundation / mandel

Obsolete. Use https://github.com/AntelopeIO/leap instead.
Other
87 stars 30 forks source link

Honor http-max-response-time-ms for complete http request #819

Closed heifner closed 2 years ago

heifner commented 2 years ago

Currently http-max-response-time-ms is enforced only for the time required to convert the http response to JSON. Many/most http requests such as /v1/chain/get_table_rows have hard-coded time restrictions of 10ms.

Change all http requests to honor http-max-response-time-ms for complete time for handling the http request including time to retrieve data and convert to JSON.

This will give greater control to API operators and also allow locally running nodeos to set unlimited time. Note, however, if allowed to set to large values this can impact block production window times and speculative execution of incoming blocks. A node operator could set http-max-response-time-ms to a large value and then tie up the main thread for large amounts of time handling http requests impacting block production and block validation.

Related https://github.com/EOSIO/eos/issues/10560