PageSourceSearch

https://hypervel.org/assets/introduction.html-m6nY0G2E.js

js hypervel.org collected 2026-10-04 19:22:03 UTC 13,267 bytes, 34 lines download raw bytes

1import{_ as s,c as r,b as a,d as n,a as t,o as i,r as o}from"./app-ChViQP5P.js";const l={},p=n(`<h2 id="introduction" tabindex="-1"><a class="header-anchor" href="#introduction"><span>Introduction</span></a></h2><p><strong>Hypervel</strong> is a Laravel-style PHP framework with native coroutine support for ultra-high performance.</p><p>Hypervel ports many core components from Laravel while maintaining familiar usage patterns, making it instantly accessible to Laravel developers. The framework combines the elegant and expressive development experience of Laravel with the powerful performance benefits of coroutine-based programming. If you&#39;re a Laravel developer, you&#39;ll feel right at home with this framework, requiring minimal learning curve.</p><p>This is an ideal choice for building microservices, API gateways, and high-concurrency applications where traditional PHP frameworks often encounter performance constraints.</p><h2 id="why-hypervel" tabindex="-1"><a class="header-anchor" href="#why-hypervel"><span>Why Hypervel?</span></a></h2><p>While Laravel Octane impressively enhances your Laravel application&#39;s performance, it&#39;s crucial to understand the nature of modern web applications. In most cases, the majority of latency stems from I/O operations, such as file operations, database queries, and API requests.</p><p>However, Laravel doesn&#39;t support coroutines - the entire framework is designed for a blocking I/O environment. Applications heavily dependent on I/O operations will still face performance bottlenecks. Consider this scenario:</p><p>Imagine building an AI-powered chatbot where each conversation API takes 3-5 seconds to respond. With 10 workers in Laravel Octane receiving 10 concurrent requests, all workers would be blocked until these requests complete.</p><p>For I/O-intensive scenarios, even with Laravel Octane&#39;s improvements, your application&#39;s ability to handle concurrent requests is still limited by the duration of these I/O operations. Hypervel addresses this issue by leveraging coroutines, allowing for efficient handling of concurrent I/O operations without blocking workers. This approach can significantly improve the performance and concurrency of applications with heavy I/O requirements.</p><p>Moreover, it&#39;s unlikely that Laravel Octane will support coroutines in the near future (see <a href="https://github.com/laravel/octane/issues/765" target="_blank" rel="noopener noreferrer">this issue</a>), given that only Swoole runtime currently supports this feature and considering backward compatibility with the framework and third-party packages.</p><div class="hint-container important"><p class="hint-container-title">Important</p><p>Even if Laravel Octane supported coroutines, these coroutines would still be limited to a single request, with workers remaining blocked until all I/O operations within that request completed. That means your Laravel application can&#39;t get better QPS results in this kind of scenario.</p><p>See <a href="https://github.com/swoole/swoole-src/pull/4330" target="_blank" rel="noopener noreferrer">this pull request</a> for more information.</p></div><h2 id="laravel-octane" tabindex="-1"><a class="header-anchor" href="#laravel-octane"><span>Laravel Octane</span></a></h2><p>Laravel is renowned for its expressive and elegant syntax, powerful package ecosystem, and thriving community. However, due to the traditional lifecycle in PHP-FPM, Laravel&#39;s performance is limited despite various optimization techniques applied to the framework.</p><p>At LaraCon 2021, Taylor Otwell announced Laravel Octane — a first-party package maintained by the Laravel team. Octane significantly enhances Laravel application performance by running your code in a long-lived process on high-powered application servers such as Swoole, RoadRunner, and FrankenPHP.</p><blockquote><p>For more information, see <a href="https://laravel.com/docs/master/octane" target="_blank" rel="noopener noreferrer">Laravel Octane</a>.</p></blockquote><h2 id="hyperf" tabindex="-1"><a class="header-anchor" href="#hyperf"><span>Hyperf</span></a></h2><p>Hypervel is built on the Hyperf ecosystem, similar to how Laravel relates to Symfony. Hyperf is a high-performance framework powered by Swoole and Swow, with all components natively supporting coroutines and strictly adhering to PSR standards. It allows developers to easily build high-concurrency applications with built-in supp
1ort for non-blocking I/O.</p><p>The Hyperf project maintains high activity levels on GitHub, with regular feature updates and version releases. This demonstrates strong community engagement and consistent development progress. With over 6,000 stars on GitHub and more than 350 contributors since 2019, Hyperf is a top choice for developers seeking a modern web framework to build high-performance PHP projects with asynchronous I/O support.</p><blockquote><p>For more details, visit <a href="https://hyperf.io/" target="_blank" rel="noopener noreferrer">Hyperf&#39;s official website</a>.</p></blockquote><h2 id="benchmark" tabindex="-1"><a class="header-anchor" href="#benchmark"><span>Benchmark</span></a></h2><p>The benchmark tests cover two distinct scenarios to evaluate performance under different conditions:</p><ol><li><p>Simple API Test:</p><ul><li>A basic <code>hello world</code> API endpoint</li><li>No middleware applied</li><li>Tests raw response speed</li></ul></li><li><p>Simulated I/O Wait Test:</p><ul><li>Sleep for one second to simulate I/O wait time</li><li>Respond with <code>hello world</code> after the delay</li><li>Tests performance under I/O-bound conditions</li></ul></li></ol><blockquote><p>worker numbers are configured as CPU cores by default</p></blockquote><p>Test Environment Specifications:</p><ul><li>Hardware: Apple M1 Pro 2021</li><li>CPU: 8 cores</li><li>RAM: 16 GB</li></ul><h3 id="simple-api-test" tabindex="-1"><a class="header-anchor" href="#simple-api-test"><span>Simple API Test</span></a></h3><ul><li>Laravel Octane (8 workers)</li></ul><div class="language-text" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">Running 10s test @ http://127.0.0.1:8000/api</span>
2<span class="line">  4 threads and 100 connections</span>
3<span class="line">  Thread Stats   Avg      Stdev     Max   +/- Stdev</span>
4<span class="line">    Latency    15.93ms   16.86ms 155.82ms   87.02%</span>
5<span class="line">    Req/Sec     2.07k   420.46     3.10k    66.00%</span>
6<span class="line">  82661 requests in 10.04s, 16.95MB read</span>
7<span class="line">Requests/sec:   8230.97</span>
8<span class="line">Transfer/sec:      1.69MB</span>
9<span class="line"></span></code></pre></div><ul><li>Hypervel (8 workers)</li></ul><div class="language-text" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">Running 10s test @ http://127.0.0.1:9501/api</span>
10<span class="line">  4 threads and 100 connections</span>
11<span class="line">  Thread Stats   Avg      Stdev     Max   +/- Stdev</span>
12<span class="line">    Latency     7.66ms   17.85ms 249.92ms   90.25%</span>
13<span class="line">    Req/Sec    24.42k    10.47k   54.37k    68.53%</span>
14<span class="line">  971692 requests in 10.06s, 151.98MB read</span>
15<span class="line">Requests/sec:  96562.80</span>
16<span class="line">Transfer/sec:     15.10MB</span>
17<span class="line"></span></code></pre></div>`,30),c=n(`<h3 id="simulated-i-o-wait-test" tabindex="-1"><a class="header-anchor" href="#simulated-i-o-wait-test"><span>Simulated I/O Wait Test</span></a></h3><ul><li>Laravel Octane (8 workers)</li></ul><div class="language-text" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">Running 10s test @ http://127.0.0.1:8000/api</span>
18<span class="line">  4 threads and 100 connections</span>
19<span class="line">  Thread Stats   Avg      Stdev     Max   +/- Stdev</span>
20<span class="line">    Latency     1.03s   184.92us   1.03s    87.50%</span>
21<span class="line">    Req/Sec     1.52      1.29     5.00     54.84%</span>
22<span class="line">  80 requests in 10.10s, 16.80KB read</span>
23<span class="line">  Socket errors: connect 0, read 0, write 0, timeout 72</span>
24<span class="line">Requests/sec:      7.92</span>
25<span class="line">Transfer/sec:      1.66KB</span>
26<span class="line"></span></code></pre></div><ul><li>Hypervel (8 workers)</li></ul><div class="language-text" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">Running 10s test @ http://10.10.4.12:9501/api</span>
27<span class="line">  16 threads and 15000 connections</span>
28<span class="line">  Thread Stats   Avg      Stdev     Max   +/- Stdev</span>
29<span class="line">    Latency     1.02s    64.72ms   1.87s    93.62%</span>
30<span class="line">    Req/Sec     1.16k     1.68k    9.15k    87.59%</span>
31<span class="line">  109401 requests in 10.09s, 19.82MB read</span>
32<span class="line">Requests/sec:  10842.71</span>
33<span class="line">Transfer/sec:      1.96MB</span>
34<span class="line"></span></code></pre></div><blockquote><p>In this case I run wrk in another machine to make sure wrk can use as much resource for keeping more connections.</p></blockquote>`,6),d=t("blockquote",null,[t("p",null,"Laravel Octane's QPS number is close to 8, but because it differs so significantly from Hypervel's numbers, it appears this way when generated in the chart.")],-1);function h(u,m){const e=o("ChartJS");return i(),r("div",null,[p,a(e,{id:"chart-162",config:"eJyNUsFuwjAMvfMVUU6bhFBbBJTdpl2YNGlMO3BAHFLqddGiJkoCAk38++wS2o51qJdEcd7z87P9PWCM+6MB/sB4JiwfUiAXXmCAPvGlRAbK4XvNF6CUZittVc4el898Q/BAcOArUBVhgdwkIIEXYcUeFHvdelFCpRUgQXGdJuNoNJ+FvNVXJrZfhdW7Mn/SSlvKY4tM3CWTyZDFaYLHfDxk0Si9b2fMtM3B3qTEHYSVzP0nEuLwcboguvwssHEWDXU5mU8n02SURn2sxDOsJomneIyjflauKL2sVPcGz8oU18ZLXdLMwqAtOIMBuadt8HYHYbpuKxQ0OIwcWg8CeDQGOQY/hHJw3Tp+vAlvFe6lVyTegKmj0hklKEdT0wUPB08teVu+8zp+9nm5QxXcqF0hW2471f7VqpV+rzDbO1YvwR/bCgooyWZLwGgnqe2Uy2tTk8610mwGp8EPWa3cIQ==",type:"json"}),c,a(e,{id:"chart-189",config:"eJyNUsFOAjEQvfMVTU+aEKSLCHj1ookJGg8eCIcuO66NzbZpC0IM/+7MUnZXXMhe2vT1zbx5M/PTY4yHnQV+z3gqHe8TkMkgEaBPfGmZgvb4XnDh2bdUgT3dzPmSqJHsIZSEEmExsA6m5M/SyQ1oNl8FWUCpEylRbTEZzJKYtMRTufrKnVkX2YPRxlESl6fyKhmP+0xMEzxmoz4bDqbXzXSpcRm4iyGiJeBdZeETA0T82B8ZbWYesWMO3bTZEMPpbTKYiC5WxASrScQdHqNhNysnIZ2slPcSz9IUNzYoU9DA4oQdeIuA2tAaBLeGOFq/khpqHiLbxoMIAY1BhuCH1B5OW8d3F+mNwoMKmsRrMnVUeasl5ahrOvJhG6glry9vvMIPPo93rIJbvc5Vw22r2lmtSunv/rKNZ9US/LOtIYeCbDYErPGK2k65grFV0KFWmk1v3/sFAVXZww==",type:"json"}),d])}const f=s(l,[["render",h],["__file","introduction.html.vue"]]),g=JSON.parse('{"path":"/docs/introduction.html","title":"","lang":"en-US","frontmatter":{"description":"Introduction Hypervel is a Laravel-style PHP framework with native coroutine support for ultra-high performance. Hypervel ports many core components from Laravel while maintaini...","head":[["meta",{"property":"og:url","content":"https://hypervel.org/docs/introduction"}],["meta",{"property":"og:site_name","content":"Hypervel"}],["meta",{"property":"og:title","content":"Hypervel - A Coroutine PHP Framework for Laravel Artisans"}],["meta",{"property":"og:description","content":"Hypervel is a Laravel-style framework with native coroutine support for ultra-high performance."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:image","content":"https://hypervel.org/home.png"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2026-02-14T02:32:03.000Z"}],["meta",{"property":"article:modified_time","content":"2026-02-14T02:32:03.000Z"}],["meta",{"name":"twitter:title","content":"Hypervel - A Coroutine PHP Framework For Laravel Artisans"}],["meta",{"name":"twitter:description","content":"Hypervel is a Laravel-style framework with native coroutine support for ultra-high performance."}],["meta",{"name":"twitter:image","content":"https://hypervel.org/home.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"\\",\\"image\\":[\\"https://hypervel.org/home.png\\"],\\"dateModified\\":\\"202
346-02-14T02:32:03.000Z\\",\\"author\\":[]}"],["title",{},"Hypervel - A Coroutine PHP Framework for Laravel Artisans."]]},"headers":[{"level":2,"title":"Introduction","slug":"introduction","link":"#introduction","children":[]},{"level":2,"title":"Why Hypervel?","slug":"why-hypervel","link":"#why-hypervel","children":[]},{"level":2,"title":"Laravel Octane","slug":"laravel-octane","link":"#laravel-octane","children":[]},{"level":2,"title":"Hyperf","slug":"hyperf","link":"#hyperf","children":[]},{"level":2,"title":"Benchmark","slug":"benchmark","link":"#benchmark","children":[{"level":3,"title":"Simple API Test","slug":"simple-api-test","link":"#simple-api-test","children":[]},{"level":3,"title":"Simulated I/O Wait Test","slug":"simulated-i-o-wait-test","link":"#simulated-i-o-wait-test","children":[]}]}],"git":{"updatedTime":1771036323000,"contributors":[{"name":"Albert Chen","email":"[email protected]","commits":1}]},"filePathRelative":"docs/introduction.md","autoDesc":true}');export{f as comp,g as data};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.