Forums

Static Files Mapping performance

Hi PA team, As I know, statics files do better performance. So I mapping assets to my folder static folder.

Sometime performance is not good, I check my log and see this:

`172.71.190.40 - - [28/Mar/2023:03:04:43 +0000] "GET /assets/cfg/yt6_imusi.2.4 HTTP/1.1" 200 1858 "-" "com.vntechplayer" "158.62.34.253, 172.71.190.40" response-time=1.534

172.71.190.52 - - [28/Mar/2023:03:04:43 +0000] "GET /assets/cfg/yt6_imusi.2.4 HTTP/1.1" 200 1858 "-" "com.vntechplayer" "2601:600:c480:2250:149f:6006:490c:55fb, 172.71.190.52" response-time=1.432

172.69.45.135 - - [28/Mar/2023:03:04:43 +0000] "GET /assets/cfg/yt6_imusi.2.4 HTTP/1.1" 200 1858 "-" "com.vntechplayer" "202.126.88.132, 172.69.45.135" response-time=0.867

172.71.190.55 - - [28/Mar/2023:03:04:43 +0000] "GET /assets/cfg/yt6_imusi.2.4 HTTP/1.1" 200 1858 "-" "com.vntechplayer" "2604:af80:2047:fbb0:2d9b:899c:c71c:3329, 172.71.190.55" response-time=0.790

172.71.190.41 - - [28/Mar/2023:03:04:43 +0000] "GET /assets/cfg/youtube14_1.4 HTTP/1.1" 200 1858 "-" "com.chiquoc.musictube" "2607:fb90:92a2:6448:3ce1:e187:1bc8:9bdd, 172.71.190.41" response-time=0.780 `

And in some case it have good performance:

` 172.71.26.153 - - [28/Mar/2023:03:04:46 +0000] "GET /assets/category/nz HTTP/1.1" 200 466 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36" "49.224.206.55, 172.71.26.153" response-time=0.049

172.70.34.91 - - [28/Mar/2023:03:04:46 +0000] "GET /assets/cfg/youtube14_1.4 HTTP/1.1" 200 1858 "-" "com.chiquoc.musictube" "2607:fb90:fa25:953e:1d23:1464:9f13:c3ff, 172.70.34.91" response-time=0.028

172.71.26.105 - - [28/Mar/2023:03:04:46 +0000] "GET /assets/cfg/yt6_imusi.2.4 HTTP/1.1" 200 1858 "-" "com.vntechplayer" "49.179.43.37, 172.71.26.105" response-time=0.039 `

Can I need to do to fix this problem?

Web workers still apply when serving static files. There are 2 threads for serving static files per worker, but if they are all busy, then the request will have to wait. You may need to add more workers.

Thanks for your reply, but currently, i already setup 18 web workers for that web app.

All of the requests in the each of the examples you showed were in the same second. Check how many other requests were made in those same seconds or in the second before. You will probably find that in the first case, there were many more requests.