We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
作为服务端,为了避免影响用户体验,接口要求必须在N ms内返回。 如果不在客户端控制,如何在服务端实现这个能力?
一种方法是,进入工作线程后,定义一个Timer,设置超时时间,开启另个线程执行工作任务,当超时后,主线程cancel掉工作任务,并返回客户端。 还有没有其他的简易实现办法?
The text was updated successfully, but these errors were encountered:
系统性的回答这个问题比较难,一般的措施还是客户端快速失败、限流、排队请求丢弃等,中断正在处理的任务不是一个好的解决方案。 java chassis的最佳实践可以参考: https://servicecomb.apache.org/references/java-chassis/zh_CN/references-handlers/fail-retry.html
Sorry, something went wrong.
No branches or pull requests
作为服务端,为了避免影响用户体验,接口要求必须在N ms内返回。
如果不在客户端控制,如何在服务端实现这个能力?
一种方法是,进入工作线程后,定义一个Timer,设置超时时间,开启另个线程执行工作任务,当超时后,主线程cancel掉工作任务,并返回客户端。
还有没有其他的简易实现办法?
The text was updated successfully, but these errors were encountered: