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 easilyCodePudding 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 problemCodePudding 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 findCan be placed in the front when receiving number will blacklist user ruled out