Best way to make insert data in logs web API. REST or WebSockets
https://softwareengineering.stackexchange.com/questions/389075
-
22-02-2021 - |
Pregunta
I want to make a centralized log web API, so it will have a large amount of data per seconds. the logs will comming from others WEB API
I was thinking if i make the REST API, all of the POST made need to return an answer and maybe can overload the server with so much request.
then I think in webSockets, establish a communication with the API that made the logs and only send data without necessary responses but I don't know how reliable are that.
So in this case, what method would be fastest and more reliable? Sorry if my english isn't good :(
regards.
Solución
WebSockets will be more efficient. Allowing you to stream your log records without having to deal with the overhead of a HTTP call for each record.