限制对RESTful服务的呼叫次数 [英] Limit number of calls to RESTful service

查看:59
本文介绍了限制对RESTful服务的呼叫次数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在多个节点上部署了RESTful服务,我们希望限制每个客户端每分钟对每个客户端有不同配额的服务呼叫. 我们的堆栈:Jboss应用程序服务器,Java/Spring RESTful服务.

we have a RESTful service deployed on multiple nodes and we want to limit the number of calls coming to our service from each client with different quota for each client per minute. our stack : Jboss application server, Java/Spring RESTful service.

实现这一目标的可能技术是什么云?

What cloud be the possible technique to implement this?

推荐答案

有时候,我读了 a突出显示相同主题的好文章. 想法是将这种逻辑转移到负载平衡代理中,这里有一些很好的理由:

Sometimes ago I read a good article where the same theme was highlighted. The idea is to move this logic into load balancing proxy and here some good reasons to do it:

  1. 消除了技术债务-如果您将速率限制逻辑与应用逻辑结合在一起,那么您就不需要了技术债务.您可以解除和转移债务

  1. Eliminates technical debt - If you’ve got rate limiting logic coupled in with app logic, you’ve got technical debt you don’t need. You can lift and shift that debt

效率提高-您正在上游分流逻辑,这意味着您所有的计算资源都专用于计算.您可以更好地预测

Efficiency gains - You’re offloading logic upstream, which means all your compute resources are dedicated to compute. You can better predict

安全-众所周知,应用层(请求-响应)攻击正在增加,包括拒绝服务.通过利用具有更大连接能力的上游代理,您可以阻止那些攻击,因为它们永远不会到达实际服务器附近.

Security - It’s well understood that application layer (request-response) attacks are on the rise, including denial of service. By leveraging an upstream proxy with greater capacity for connections you can stop those attacks in their tracks, because they never get anywhere near the actual server.

这篇关于限制对RESTful服务的呼叫次数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆