Skip to content

Commit

Permalink
perf: fix disk io and improve the ngxway QPS
Browse files Browse the repository at this point in the history
  • Loading branch information
WGrape committed Feb 5, 2023
1 parent 3c92761 commit 5aebde4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
3 changes: 2 additions & 1 deletion nginx/conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ http {
'"$http_user_agent" "$http_x_forwarded_for"';

sendfile on;
keepalive_timeout 65;
keepalive_timeout 75s;
keepalive_requests 1024;

# Declare a shared memory region
lua_shared_dict my_limit_req_store 30m;
Expand Down
12 changes: 1 addition & 11 deletions vhosts/ngxway.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,7 @@ server {
listen 8090;
server_name localhost;

# custom time variable.
if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})") {
set $year $1;
set $month $2;
set $day $3;
set $hour $4;
set $minutes $5;
set $seconds $6;
set $date $1$2$3$4;
}
access_log /dist/logs/ngxway.access.$date.log;
access_log /dist/logs/ngxway.access.log main buffer=128k flush=5m;
error_log /dist/logs/ngxway.error.log error; # error_log not support variable, such as /dist/logs/ngxway.error.$date.log

location /api/ {
Expand Down

0 comments on commit 5aebde4

Please sign in to comment.