Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第 27题(2019-08-27):怎么限制接口调用次数? #29

Open
qappleh opened this issue Aug 27, 2019 · 1 comment
Open

第 27题(2019-08-27):怎么限制接口调用次数? #29

qappleh opened this issue Aug 27, 2019 · 1 comment

Comments

@qappleh
Copy link
Owner

qappleh commented Aug 27, 2019

去了京东、腾讯、虾皮等厂子都问到了这个问题。
我们之前也遇到过,基本就是后端工程师限制用户的接口调用次数,面试官希望可以有更多的答案。

@qappleh
Copy link
Owner Author

qappleh commented Aug 28, 2019

1:网关控制流量洪峰,对在一个时间段内出现流量异常,可以拒绝请求
2:源ip请求个数限制。对请求来源的ip请求个数做限制
3:http请求头信息校验;(例如host,User-Agent,Referer)
4:对用户唯一身份uid进行限制和校验。例如基本的长度,组合方式,甚至有效性进行判断。或者uid具有一定的时效性
5:前后端协议采用二进制方式进行交互或者协议采用签名机制
6:UA校验,人机验证,验证码,短信验证码,滑动图片形式,12306形式

@qappleh qappleh changed the title 第 27题(2019-08-27):前端怎么限制接口调用次数? 第 27题(2019-08-27):怎么限制接口调用次数? Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant