A
A
Alexander Mikhailenko2019-02-21 16:18:40
Redis
Alexander Mikhailenko, 2019-02-21 16:18:40

Should Redis store the data used by the search?

I have about 50,000 locations (cities, countries, states) in the file format, they will be used by the user quite actively. A person will be able to search for the locations he needs through the search.
Should such data be sent to Redis or can it be written to the database (I use Postgresql)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
melnikov_m, 2019-02-21
@m1hasik

50 thousand is not so much, if you correctly build indexes, then there should not be a load on the database. Radish or memkesh can be used as a cache if needed.

R
Roman Mirilaczvili, 2019-02-21
@2ord

It is possible to keep the N most popular locations from all requests ( LRU ) in the cache. If it is not in the cache, then look in Postgresql.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question