Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Microlog example based on Nginx and Nginx module (NGX-PHP8), A high-performance implementation that does not use the combination of Nginx and PHP-FPM, which is safe and reliable.

License

NotificationsYou must be signed in to change notification settings

soulteary/ngx-php-micro-blog

Repository files navigation

English Ver /中文教程

使用 Nginx 模块 NGX-PHP 实现的一个简单的微博应用 Demo,不依赖 PHP-FPM 等技术栈,高效、安全、可靠。

基于 Nginx 官方容器构建,基础镜像仅 12MB。

界面预览

使用方法

启动容器:

docker run --rm -it -v`pwd`/data:/usr/share/nginx/html/data:rw -p 8090:80 soulteary/ngx-php:8-microblog

或者使用docker compose:

docker-compose -f docker-compose.ngx-php.yml up

打开浏览器:http://localhost:8090

性能测试

对比soulteary/ngx-php:8php:8.1.10-apache-buster

soulteary/ngx-php:8

wrk -t16 -c 100 -d 30s http://127.0.0.1:8090     Running 30stest @ http://127.0.0.1:8090  16 threads and 100 connections  Thread Stats   Avg      Stdev     Max   +/- Stdev    Latency    94.01ms   15.94ms 431.01ms   81.62%    Req/Sec    64.02     11.33   148.00     74.26%  30715 requestsin 30.09s, 65.03MBreadRequests/sec:   1020.65Transfer/sec:      2.16MB

php:8.1.10-apache-buster (opcache.enable=1)

wrk -t16 -c 100 -d 30s http://127.0.0.1:8090     Running 30stest @ http://127.0.0.1:8090  16 threads and 100 connections  Thread Stats   Avg      Stdev     Max   +/- Stdev    Latency   132.92ms  158.49ms   1.98s    86.67%    Req/Sec    54.38     56.83   670.00     94.88%  22603 requestsin 30.08s, 49.40MBread  Socket errors: connect 0,read 0, write 0, timeout 112Requests/sec:    751.53Transfer/sec:      1.64MB

相关项目

About

Microlog example based on Nginx and Nginx module (NGX-PHP8), A high-performance implementation that does not use the combination of Nginx and PHP-FPM, which is safe and reliable.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp