REST 有效负载最大大小?

问题描述:

我们正在考虑使用 REST 接口在内部应用之间进行通信.应用程序 A 将不得不向应用程序 B 传递相当多的表示金融投资组合的数据.如果 REST 是使用 HTTP 实现的,那么使用 REST API 可以传递的数据量是否有任何限制?我不确定是否应该对大型数据集使用其他协议(即:RMI).

We are thinking of using a REST interface for communication between internal apps. App A will have to pass a fair bit of data representing a financial portfolio to app B. Is there any limit to the amount of data that can be passed using a REST API given that REST is implemented using HTTP? I wasn't sure if another protocol (ie: RMI) should be used with a large data set.

不,如果有任何此类限制,这几乎取决于服务器实现.

No, it's pretty much up to the server implementation if there's any such limit.

URL 的大小有限制(如果您希望在 URL 上放置大量数据,例如使用 GET),但没有为 POST 或 PUT 定义限制.

There's a limit on the size of a URL (if you wish to put large amounts of data on the URL, like with a GET), but no defined limit for a POST or PUT.