Thursday 25 April 2019

Node Express Redirect Server - Array filter vs Mongo Query

Hi there - I am setting up a dockerized node server to handle redirects for a decommissioned domain, so simply takes the URL path and perhaps matches it with regex against a list of urls with partly matching paths on a new domain. The volume of the list could range from about 4K to 50K. Still working it out but there's very little resources beyond this simple server to handle this. I'm wondering though in Node and JS in general at what point does a Mongo Query actually make performance better if at all against simple arrays of url strings like this. I'm trying to figure out if I can just load list one and list two, parse the request a bit, and filter or regex match it from the items in the second list to avoid a second container for Mongo, or if this might all fall apart without using a proper DB. Considered maybe redis could help but haven't used it yet.

Submitted April 25, 2019 at 11:06PM by charmgame

No comments:

Post a Comment