Score:0

Laravel, nginx, Docker, PHP - Load Test, Very Unsatisfactory Results

vn flag

We are creating two servers in Hetzner (https://www.hetzner.com/cloud).

Parmeters of both: CPX51 - vCPU 16 AMD, RAM 32 GB.

On one server with Ubuntu 22.04 we install Docker and run the PHP application Laravel + nginx on it. The nginx image is https://serversideup.net/open-source/docker-php/.

On the other one we install the Artillery application (https://www.artillery.io)

Our test scenario

config:
  target: "https://IP"
  tls: {
      "rejectUnauthorized": false
  }
  phases:
    - duration: 60
      name: "1000 on 60 sec"
      arrivalCount: 1000
    - duration: 60
      name: "2000 on 60 sec"
      arrivalCount: 2000
    - duration: 60
      name: "5000 on 60 sec"
      arrivalCount: 5000
    - duration: 60
      name: "10000 on 60 sec"
      arrivalCount: 10000
    - duration: 60
      name: "15000 on 60 sec"
      arrivalCount: 15000
    - duration: 60
      name: "20000 on 60 sec"
      arrivalCount: 20000
scenarios:
  - name: Main
    flow:
      - get:
          url: "/"

Our result is:

Results

The results seem poor to us, especially reading articles like this (https://reviewsignal.com/blog/2014/06/25/40-million-hits-a-day-on-wordpress-using-a-10-vps/). Our portal will be hosted on Kubernetes with LoadBalancer at the end. However, we would like to know which results on such a machine are good and which are bad. We cannot find such a reference anywhere. We are looking for some sort of comparison. Can you help us?

Score:0
cn flag

Have you tried applying any Nginx configuration from the article you "read" in particular or any Nginx high-load configuration in general?

Have you did the same on Laravel side?

If you're using a database (and I believe you are) have you walked through database vendor's recommendations on its performance and tuning?

Also your test doesn't make a lot of sense as I don't think hammering the IP address of your endpoint is a valid use case for your application, even if it's a one-pager or SPA it will contain images, scripts, styles, etc. which should also be downloaded. And if your application assumes more complex logic, user journeys, etc. - you should replicate real user actions with 100% accuracy and you might need a more advanced performance testing tool like Apache JMeter which can be configured to behave like a real browser

vn flag
Thank you for your explanation. Is there any table/comparison/indicator that tells how many users/requests per minute is Heavy Load? We are creating a startup with a small team. We don't know what kind of traffic to expect. What score of users/requests in nginx per minute is a good score for one instance?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.