I have application in Angular 11
and Laravel
.
I need display time status every second in html in Angular
. Now I have method:
this.uptimeService.getUptimeByUserForToday(userid, newDateNow).subscribe(res => {
if (res.status === 'Ok') {
if (res.item != null) {
this.currentUptimeDTO = res.item;
}
}
});
The request is send over Http
every second. I get error 429, too many request
. I can set in app/Http/Kernel.php
throttle value:
'api' => [
'throttle:60,1',
],
What is the case when will be a lot of users? This is the only way to refresh time every second on the view in Angular
?
In C# there is a SignalR
that sends a request on a lower layer than Http
and packets are smaller than Http
packets.
In Laravel (PHP)
there is only an Http
request?