I have JavaScript object which is converted to JSON and sent every time the user changes some filter for the search (for example, after he clicks the button or select/unselect item in the list). Data gathered through this JSON is filtered and used for building database query. After query is executed, results from database are returned in JSON again and this time it's used to append results on the page.

Now, I want to know if this will ruin performances, for example, if website has around thousands of visitors every day and if answer is affirmative, what can be done to stop this from happening? Keep in mind that site is small and most probably it will never need some kind of scaling, so I'm looking for cheap optimal solution.

  • YAGNI wait and then improve it only if neccesary. Anyway, your current solution seems fine for most applications. Commented Mar 13, 2017 at 5:50

1 Answer 1


Depending on the data being searched perhaps using some caching mechanism would be appropriate so that instead of hitting the database you hit the cache first and only if the data is not available in cache do actually query the database.

If caching is not an option then multiple read database servers could help with keeping the speed high.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.