Photo by Joshua Aragon on Unsplash

Probably you don’t need need change your Regex Engine, but here’s something you should definitely know about it. Most of the regex engines implementations out there use backtracking, which runs in O(2^n) exponential time, meaning that when provided with a malicious input it could take a really long time to finish.

As a brief recap, here’s a Big-O Complexity Chart as can be seen at

Photo by Christian Wiediger on Unsplash

If you’ve got here because the title caught your attention, then chances are you’ve struggled before with some DNS related issues using Node.js. These might appear as the infamous EAI_AGAIN or even the widely popular ETIMEDOUT, which happened to me because I’ve set a timeout limit to the HTTP requests.

In my case, my company’s service recently experienced a sudden increase in usage, which led these problems to occur more often, even to the point of causing outages. …

Rafael Piovesan C Machado

Software Engineer passionate about learning new technologies and skills. Enthusiastic about Big Data, Advanced Analytics and Machine Learning.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store