skip to Main Content

A python script I write generates IDs that I need to add to a list, while another script checks, if the ID already exists in the list. There are no other tables, relations or anything, just a huge, growing list of 6-letter strings. I need to add and read values as fast as possible at the same time. What would be the database of choice in that case? A NoSQL database like redis?

2

Answers


  1. Yes, MongoDB or Redis, can do the work

    Login or Signup to reply.
  2. Redis is a perfect fit for this, you can use redis hashes. Also ensure you shard hashes for efficiency see below link for more details on how instagram reduces the total memory requirements by using redis hashes.

    https://instagram-engineering.com/storing-hundreds-of-millions-of-simple-key-value-pairs-in-redis-1091ae80f74c

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search