3 ms·
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
by hbrundage 15y ago
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 15y agoSure, 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 15y agoAnd 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 https://github.com/brianlmoon/GearmanManager, but it requires php-pcntl rather than the supervisord setup)