Commits
Andrea Biscuola authored 17964378da0
........S. [ZBXNEXT-3877] Use the curl_multi_* API instead of the curl_easy_* API The use of the multi api can allow the server to handle multiple connections in parallel in a non-blocking way. This translate in a performance improvement during data sending to the history service in the order of more than 5X. We first prepare all the CURL handles that we need with their buffers and URL ready. After that they are added to the multi handler and once everything is in place, send the data in parallel. More optimization can be performed here, probably we can reduce the amount of connections used by pipelining the requests in the handler. This patch also generalize the value processing, by being transparent on how many handlers are created. All the important informations are packed in the senders array of structures and adding a new value type in the future require changing just some minor places. Idea from Andris Z. about the usage of the multi api.