Wednesday, 19 February 2020

How good is ProgreSQL to store rate limit request logs?

I'm doing a technical interview for a full-stack position, because although I usually do front-end, I also feel comfortable doing back-end, but there are lots of things I have no experience with.I'm being asked to implement rate-limit to several rest end-points. It states:Implement rate-limiting on all of the API endpoints. Do not use an off-the-shelf solution such as https://www.npmjs.com/package/express-rate-limit.And then it follows to give information for a ProgreSQL database connection (the end-points use ProgreSQL). I understand that Redis would be a better database engine for this case, but for what I understand I would need to install it on a server.The code should be hosted on glitch or heroku. -Is it possible to install Redis on glitch and heroku? -Should I assume that they want me to create a table on the ProgreSQL DB for storing request logs?Extra question -How should I delete older request? setInterval or is there is a more robust way?

Submitted February 19, 2020 at 11:07AM by demilp

No comments:

Post a Comment