Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Pushing to 100,000 API clients simultaneously (fanout.io)
16 points by jkarneges on Oct 31, 2013 | hide | past | favorite | 5 comments


Pretty cool!

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.


1. Pushpin can route by the start of the request path using the path_beg parameter in the rule (e.g. "*,path_beg=/uploads [upload server]"). For more advanced routing logic I suggest putting HAProxy in front of Pushpin.

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.


For my use case, I see Pushpin or something like it being more of a server that handles client connections, auth, and routing. Kinda like a super load balancer. Then you could have a normal load balancer in the front to give clients a single IP to connect to. The whole point being to reduce load on the app server, DB, etc by performing logic (auth, basic validation) that must be performed on every request.

I can understand if that is not the goal of the project since the main focus seems to be realtime over HTTP.


I have been considering some special auth support. For example, there could be rules like "if an Authentication header is identical for multiple requests, then assume it is from the same authenticated user entity without necessarily forwarding the request to the origin server again". This alone doesn't buy you anything, but it could be used as the basis of further rules such as a cache layer that caches per-user.

These ideas are not totally baked but could help in reducing load to the backend servers, which falls in line with Pushpin's goals.


Sounds great. Definitely an interesting project that I will keep my eye on. Yes I am a cyclops... :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: