Closed xavierhardy closed 6 years ago
Hey thanks for the tip.
However one core point in Sauna is that checks are independent from each others. It would be weird for a check being run now to be impacted by a check that ran 1 minute ago. This is what sessions do, they keep state between requests.
Moreover there are some thread safety issues to take into account as checks can be run by different threads and Session
objects are not thread safe.
To improve HTTP request performance, you should avoid re-opening a new HTTP session each time (or at least add an option to make this configurable). With
requests
, instead of callingrequests.request
, you could create aSession
object and keep it open for each call.