avargas
Joined 14 years ago
Joined 14 years ago
This is borderline a deal breaker for me.
1) use persistent connections, let the OS handle them and tweak it to allow (both connecting server and mysql server). And never close the connection on the application side. (This could lead to potential deadlocks, but there are ways around it, like closing bad connections to clear thread info on mysql).
2) run the whole thing in a transaction, simply begin transaction or autocommit if allowed (same thing)
Doing so, when you are done rendering the content, flush it and send the correct signal to say nginx or apache to say it's done (like PHP's fastcgi_finish_request when working with FPM), and then run your commit. Obviously used when you can safely disregard failed inserts.
I have about 9 years of professional experience, working as a fulltime freelancer for the last 3. Most of my experience has been in Internet Marketing. My last client hired me to build a platform for purchasing traffic from multiple sources (Adwords, Taboola, Gemini) and handling massive amounts of data to help auto optimize media buying. I've also dealt with random problems, like having to write Lua inside Nginx in order to do real-time bot detection alongside ZeroMQ for offsite processing at massive scale. I love to solve problems.
https://www.angelovargas.com/