Laravel Octane vs Hyperf performance comparison

Sdílet
Vložit
  • čas přidán 5. 09. 2024
  • We puts these frameworks to the test with dynamic content and template rendering (I used twig for hyperF). This video showcases a head-to-head challenge, with both frameworks running similar applications designed to fetch and render data from a database. Using JMeter, we benchmark the performance, analyzing response times, error rates, and resource consumption.

Komentáře • 25

  • @stephane4487
    @stephane4487 Před měsícem +2

    I think that what the world deserves is a master comparison between Laravel Octane with FrankenPHP vs Swoole vs OpenSwoole vs Trongate vs NextJS vs SvelteKit vs NuxtJS. Your next video?

  • @gillesashley9314
    @gillesashley9314 Před 8 měsíci +5

    I believe the main problem concerning the debate against PHP and it's related frameworks is that, lot's of developers still see PHP as the PHP of 10-15 years ago, which causes them to make wrong judgements. PHP has evolved drastically and has really proven to be so stable and reliable. It has been able to stand the test of time with so so many server applications still running PHP.

    • @user-jj5mi1yl6p
      @user-jj5mi1yl6p Před 6 měsíci

      The main problem of PHP and it's related frameworks they are still staying 10-15 ago. Look on Spiral Framework and you'll see that in performance aspect it's 10 times faster than Laravel or Symfony or hyperF because of model of request/response processing.

    • @NickPoulos
      @NickPoulos Před 3 měsíci +1

      Spiral is vendor locked into RoadRunner - non starter for 95% of people.

  • @anaszwawi17
    @anaszwawi17 Před 8 měsíci +1

    Very happy to see a Tunisian covering these topics ♥

  • @banglaLang
    @banglaLang Před 2 měsíci

    loving your comparison videos. Would love to see inertiajs vs livewire

  • @binaryfire
    @binaryfire Před 9 měsíci +2

    Thanks for sharing. The main difference between Laravel and Hyperf is concurrency. You won't see that with 100 concurrent users (both frameworks can handle that easily). It would be great if you can re-test with 1000 - 2000 concurrent users. That's where you should start seeing real differences.

    • @code-for-me
      @code-for-me  Před 9 měsíci +2

      Thanks for your comment! In my tests on AWS t2.micro servers (1GB RAM, 1 vCPU), both Laravel and Next.js maxed out at 100 concurrent users, reaching 100% CPU usage in the first second. Attempting 1000 users caused server freezing akin to a DOS attack.

    • @binaryfire
      @binaryfire Před 9 měsíci +3

      ​@@code-for-me Yeah you'll probably need at least a 4GB / 4vCPU instance to test that. Swoole needs quite a bit of memory since it keeps the entire application booted in memory. 1GB doesn't leave a lot of room on top of that for requests.

  • @i.am.rossalex
    @i.am.rossalex Před 4 měsíci

    You should test hyperf coroutine and swoole support of dbs and queues. Thats where it performs better.

  • @bangsakucing
    @bangsakucing Před 2 měsíci

    Great Tunisian, nice comparison, greet from Indonesia 👍

  • @nigelnyakudya2262
    @nigelnyakudya2262 Před 9 měsíci +1

    Hie, what about Sveltekit vs Octane dynamic.. In my opinion having used both I think sveltekit will crush it.

    • @code-for-me
      @code-for-me  Před 9 měsíci

      I appreciate your input. I'll definitely consider it for my next test.

  • @user-jj5mi1yl6p
    @user-jj5mi1yl6p Před 6 měsíci

    Try Spiral Framework with RoadRunner.

  • @denm436
    @denm436 Před 9 měsíci +1

    very strange results. I'm just looking for a replacement for Laravel because... he's slow. And in my test with a sample from the database (from one table), the results are completely different. DB - PostrgreSql 14. 10 000 requests with 100 connections. Laravel produced 199 per second, and Hiperf - 3435. Interestingly, Lumen (with swooletw/laravel-swoole) produced even more - 7670 per second

    • @code-for-me
      @code-for-me  Před 9 měsíci

      Interesting, in Laravel I used Octain, and that boosted the performance, also note that production environement need to be set and cache should be optimized for Laravel to be fast.

    • @user-jj5mi1yl6p
      @user-jj5mi1yl6p Před 6 měsíci +1

      Try Spiral Framework.

  • @cirhanne
    @cirhanne Před 9 měsíci

    Octane load the whole laravel script into memory, it terms of of performance it's doing well because it's in every request it load the script from memory not from the disk but what I can't understand is how is it that in this comparaison it doesn't consume a lot of memory ?
    Can you please compare Laravel with Slim framework?

    • @code-for-me
      @code-for-me  Před 9 měsíci

      Thanks for your comment! You've raised an interesting point: why the memory usage remains stable even with added concurrent users, is indeed intriguing.
      As per my current understanding, OpenSwoole loads and bootstraps the application in memory once for every worker, distributing subsequent requests among the workers. However, I acknowledge that a deeper dive into OpenSwoole's internals, including aspects like multiprocessing and process pooling, may be necessary for a more accurate and detailed answer.

  • @ra_editz9445
    @ra_editz9445 Před 9 měsíci

    Man, i really wanna learn laravel. I'm totally new to the programming.
    recommend me a platform where i can master it super fast

    • @ra_editz9445
      @ra_editz9445 Před 9 měsíci

      Or should i learn it or not?
      And if not then what?
      I'm confused😕

    • @code-for-me
      @code-for-me  Před 9 měsíci

      Absolutely! Learning Laravel can be a valuable skill, a framework widely used in web development. Platforms like CZcams offer a wealth of Laravel tutorials for beginners.
      My suggestion would be to start by learning the basics of programming, including algorithms. Once you're comfortable with fundamental programming concepts, diving into Laravel will be a smoother process.

    • @ra_editz9445
      @ra_editz9445 Před 9 měsíci

      @@code-for-me but laravel framework updates every year may be

    • @g709z5
      @g709z5 Před 8 měsíci

      @@ra_editz9445 Google for Laracasts. Most courses require subscription, but some of them are open. Great way to start for PHP/Laravel and everything around.