web-push-php
web-push-php copied to clipboard
[ask] Send to multiple users at the same time
Stable: When sending webpush to a specific endpoint of order notification, it takes 0.07s total time, query db, req to fcm.googleapis.com and log.
Slow: When sending 200 endpoints, I time out the segments as follows:
- Time to get 200 endpoints put into the array: 0.065155s
- Time req to fcm.googleapis.com: 4.419076s
- Logging time: 0.187559s Total time: 4.885548s
Very slow: When sending continuously> 2000 endpoint, the time to req fcm.googleapis.com to 15-20s.
Currently web-push-php uses the GuzzleHttp \ Client library to request
CPU Usage: mariadbd: 36 to 80% CPU - 2 Intel core (R) Xeon (R) 2200.186 56320 KB RAM usage: mariadbd: 270 Mb total - 4Gb ram Ping fcm.googleapis.com: 1.45 ms PHP Tried 7.3 , 7.4, 8.0
The problem I realized the time req to fcm.googleapis.com is currently the cause of the slowdown. So how to optimize this time?
My List: >30K
I still continue to build a way to send large numbers of sub..
@bcat95 Hello, I've been trying to send notifications to several devices at the same time but no where as much as you're sending and or trying to send. It's just about 10 in total but I notice that it only send the notification for the very last row but not rows 1-9. Could you provide any assistance regarding this?
@bcat95 Hello, I've been trying to send notifications to several devices at the same time but no where as much as you're sending and or trying to send. It's just about 10 in total but I notice that it only send the notification for the very last row but not rows 1-9. Could you provide any assistance regarding this?
Are you having a looping problem in php?