I am currently developing a project that utilizes websockets. The primary server, which serves as both a web and websocket server, functions as a forwarding hub to other websocket servers. These secondary websocket servers do not need to have their own web servers running, but they are expected to host files that may require downloading (transferred directly via websocket depending on the situation).
Although the files are not anticipated to be very large—the current test file is around 2KB, but we anticipate an average size of 10-20KB, potentially even larger if we incorporate image encoding and other data-heavy content—they are likely to be requested from multiple hosts regularly. Clients may 'request' a file from various independent websocket servers over time. Additionally, it is common for a single client to request the same file from a specific websocket server up to 20 times per day or more.
In order to minimize bandwidth usage, I am exploring the possibility of caching these dynamic files through client-side processes.