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 :(


  • None makes the solution performant. The key is not in the delivery only. It's at how the logging service handles the IO. The delivery Interface is not that important. – Laiv Mar 23 '19 at 20:43
  • Have you considered existing logging solutions such as Splunk? Especially when performance is an issue, reinventing the wheel might be suboptimal. – Hans-Martin Mosner Mar 24 '19 at 13:45
  • @Laiv well i've thing something like that, and im test fluentd and elasticsearch and kibana, but i want something raw. – Black Hole Mar 24 '19 at 17:59

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.

  • I'm test two things, with REST post and with WebSockets, and the difference de time is something, I think if I put the WebSocket in the principal web API, I can make a connection with the WebSocket server of the logs, so always I'll have the possibility to send something – Black Hole Mar 24 '19 at 18:02
  • There's no such thing as so always I'll have the possibility to send something in distributed computing. You have the very same possibilities as with RESTful API Calls. As I suggested, the delivery layer should not be your main concern. It should be the logger architecture. On the other hand, Websockets are very sensitive to the network topology since not all the components between the client and server might support the protocol or have the sockets opened. – Laiv Mar 25 '19 at 7:58
  • No to mention about security or browser's incompatibility. Websockets are no more reliable than Http calls. – Laiv Mar 25 '19 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.