Upon reviewing my AWS billing report, I noticed an excessive data transfer of 495.385 GB on my socket.io application running on the EC2 instance. This amount seems too high for a small experimental website like mine. Could this be due to inefficient code implementation?
I have 20 .html files displaying various exchange rate charts that all request data from the socket using the following code snippet:
// Insert code snippet here
On the server side, I have different socket.emit functions for each currency. The continuous emission of sockets raises concerns about the high bandwidth usage and possibly inefficient coding practices.
Is it possible that multiple socket emissions are causing the high data transfers? If so, how can I optimize this code to reduce data consumption?
The goal is to enhance code efficiency and minimize data usage in my application.