REST API用于处理并行HTTP GET请求 [英] REST api for processing parallel HTTP GET requests
本文介绍了REST API用于处理并行HTTP GET请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的问题可能很基本.
My question might be quite basic.
我有一个Spring MVC(Spring Boot)REST api,并且有多个Spark工作者向该REST api发送并行的HTTP GET
请求(例如,不同节点上的4个worker-> 4个并行的HTTP
请求).我希望我的REST api能够并行处理这些请求.
I have a Spring MVC (Spring Boot) REST api, and multiple Spark workers that send parallel HTTP GET
requests to this REST api (e.g. 4 workers on different nodes -> 4 parallel HTTP
requests). I want my REST api be able to process these requests in parallel.
我该怎么办?我应该在我的REST API中使用回调和DeferredResult
吗?任何示例都将非常有帮助.
How can I do it? Should I use callbacks and DeferredResult
inside my REST api? Any example would be really helpful.
推荐答案
看看 查看全文