

How we track API requests with MixPanel and Gearman - nodesocket
http://blog.nodesocket.com/how-we-tracking-api-requests-with-mixpanel-an

======
hbrundage
Couldn't you just hit the MixPanel API after the response has been flushed? It
means responses are returned as fast as normal and you don't up the complexity
of the whole thing by introducing other processes and potentially
bottlenecking queues.

~~~
nodesocket
Sure, we could echo the response, then call the MixPanel cURL request, but
still our API requests would continue blocking waiting for the cURL request to
MixPanel to complete. We want API requests to complete as quick as possible.
Also, if ever MixPanel's API went down, our API requests would quickly back
up, as cURL requests to MixPanel timed out (10 seconds).

~~~
Gigablah
And Gearman takes care of re-trying failed tasks for you, too. I just wish
there was a good web interface available without having to roll my own
(there's <https://github.com/brianlmoon/GearmanManager>, but it requires php-
pcntl rather than the supervisord setup)

