Pushing to 100,000 API clients simultaneously
blog.fanout.io
blog.fanout.io
1. Is there a way to route a request to a specific backend server? For example, all file uploads go to one server and everything else goes to another? Personally, I would use something like this if I could add custom routing logic.
2. What about handling authentication? Then the request is never submitted to the backend. Again it could just be a hook for custom logic.
3. Similar to #2. Is there a way to have custom validation logic? Some validation is very application-specific which I am not talking about. However sometimes you want to validate that the request is HTTPS, JSON formatted, etc.
2. I'm not sure I follow. If authentication is used (say with Authentication or Cookie headers), then the request just gets passed to the backend server like any other request. Would you not want this?
3. This probably doesn't belong at the Pushpin layer. X-Forwarded-Protocol is used to indicate use of HTTPS, though, which the backend could use as input for enforcement.
I can understand if that is not the goal of the project since the main focus seems to be realtime over HTTP.
These ideas are not totally baked but could help in reducing load to the backend servers, which falls in line with Pushpin's goals.