期刊文献+

基于Redis限制用户访问频率的研究 被引量:3

Research on Limiting Users Access Frequency Based on Redis
下载PDF
导出
摘要 在Web系统开发中常常会遇到需要限制某些接口访问频率的情况。例如限制用户登录频率,限制用户发帖、点赞、回复的频率等。针对此类场景,本文深入研究并总结了当前两种使用Redis限制用户访问频率的主流方式——队列和滑动窗口,并对每种方式的实现原理和Java语言实现过程进行了详细阐述,最后对两种方式的性能进行了测试。在性能测试部分,本文采用多次测试取平均值的方式,分别测试了不同并发量以及不同接口响应时间下两种方式对原接口的影响,最后得到的测试结果是两种方式均对原接口影响较小且队列方式性能更优。 In the development of Web system,there are lots of situations where it is necessary to limit the frequency of access to websites.For example,limit the frequency of user login,and limit the frequency of user posting,likes,and replies.For this kind of scenario,this paper deeply studies and summarizes the current two mainstream ways of using Redis to limit the frequency that users access websites-queue and sliding window.What's more,the principle and the code in Java of each method are introduced in detail.finally,the performance of the two ways are tested.In the part of test,this paper uses the method of taking the average value of multiple tests to test the influence of the two methods on the original function under different concurrency and different function response time,and the final test result is that the two methods have less influence on the original interface and the performance of the queue mode is better.
作者 胡雅倩 HU Yaqian(Wuhan Rearch Institude of Posts and Telecommunications,Wuhan,430074,China)
出处 《网络新媒体技术》 2020年第6期21-25,50,共6页 Network New Media Technology
关键词 限制访问 登录频率 访问频率 REDIS restricted access login frequency access frequency Redis
  • 相关文献

同被引文献10

引证文献3

二级引证文献8

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部