Yes, there is a standard way to avoid the approach to storage and transition: as soon as the client connects to the slave server, the latter should open a connection to the main server and then simply transfer data from the client. This is usually done using a function io.Copy(). Thanks to the excellent duck printing using interfaces, this works for TCP connections and HTTP requests / responses.
(To get a better explanation, you should narrow down your question.)
Part of the solution even appears in similar questions suggested by stackoverflow here .
source
share