Home > Back-end >  Want to ask you some question about the cache, the company to do down the business, leadership asked
Want to ask you some question about the cache, the company to do down the business, leadership asked

Time:09-20

Want to ask you some question about the cache, the company to do down the business, leadership asked when we kill, if there are 100000 blacklisting users are eligible for seconds kill, but they are in the blacklist, have not actually kill qualifications, so that 100000, or 10.01 billion blacklisting users where such a large amount of data is good, can't come in an unknown users check the cache to determine his identity is blacklist in the tag, so that each user a kilo unknown to kill the venue to check the database, so it is good for you to how to solve, this 100000 original known where blacklist??????? Please know that the great god give some advice, thank you

CodePudding user response:

The database is simple, but is not suitable for this scenario, put the list in memory into the cache, the careful design, 100000 the concurrency value, is not a small sum of money,

CodePudding user response:

Have a memory database easily

CodePudding user response:

Go to know about the redis, now more mainstream cache middleware, you can do a lot of unexpected things, as long as you are enough memory, again big amount of data is also a small problem

CodePudding user response:

Users into an integer userid, 4 bytes should be enough, not just 8 bytes, even a 1000 w eight reached 10 M * M memory, placed in a hashset, memory footprint can't more than 100 M, judge whether the blacklist customers, dozens of CPU cycles will find


Can be placed in the front when receiving number will blacklist user ruled out
  • Related