[英]Can front-end to do something when 500 internal server come because a lot of access in the same time
I know maybe this is a strange things to ask but I'm quite curious about this, 我知道也许这是一件奇怪的事情,但是我对此很好奇,
"Is there any way for front-end especially in angular to help when 500 internal server error appear because a lot of access in the same time?". “前端是否有任何方法,尤其是当由于同时进行大量访问而出现500个内部服务器错误时,在角度方面有帮助吗?”。
this is new for me when build a website that have a lot of traffic in the specific time such as when an assignment deadline come so a lot of user access it in the same time. 当我建立一个在特定时间有很多流量的网站时(例如, 当分配截止日期到来时,那么很多用户会同时访问它),这对我来说是新的。
because I want to help my friend who dealt with the server so maybe there is something I can do with front-end especially when I use angular 7. I mean except change the server because we already tried to upgrade it 2 times 因为我想帮助与服务器打交道的朋友,所以也许我可以对前端做一些事情,尤其是当我使用angular 7时。我的意思是除了更改服务器外,因为我们已经尝试过对其进行两次升级
As the front end I think the first thing you need to do when you're seeing 429 (too many requests) or 5xx (internal errors) is to limit your retry rate. 作为前端,我认为看到429(太多请求)或5xx(内部错误)时,您需要做的第一件事就是限制重试率。 Since if the server fault is due to flooding, that's the best way you can help. 由于如果服务器故障是由洪水引起的,那么这是您可以提供帮助的最佳方法。
From a UX perspective, there are other things you can do, such as serving local data (taking the progressive web app approach). 从UX的角度来看,您还可以做其他事情,例如提供本地数据(采用渐进式Web应用程序方法)。 PWAs are a topic on their own, though. 但是,PWA本身就是一个主题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.