摘要: index.js var amqp = require('amqplib/callback_api'); const MyConsume = require('./MyConsume'); amqp.connect('amqp://name:password!@localhost:5672/vhos 阅读全文
posted @ 2024-01-26 14:45 冯元春 阅读(81) 评论(0) 推荐(0) 编辑
摘要: const http = require('http'); // 创建一个 HTTP 服务器 const server = http.createServer((req, res) => { // 设置响应头 res.writeHead(200, {'Content-Type': 'applicat 阅读全文
posted @ 2024-01-26 14:16 冯元春 阅读(29) 评论(0) 推荐(0) 编辑
摘要: nginx配置,负载均衡 upstream userservice { server 127.0.0.1:9002; server 127.0.0.1:9003; } server { listen 80; location / { proxy_pass http://userservice; pr 阅读全文
posted @ 2023-12-25 16:47 冯元春 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 不能使用sleep方法测试,改用http请求来测试. webman 8787启动 测试代码,http请求 try { $client = new Client(); $client->request('GET', "https://cn.bing.com", ['connect_timeout' = 阅读全文
posted @ 2023-12-21 10:34 冯元春 阅读(75) 评论(0) 推荐(0) 编辑
摘要: wrk -c 1000 -t 10 -d 10s nginx 静态html 腾讯云 10Mbps QPS 3250.77 20Mbps QPS 6360.29 50Mbps QPS 7591.71 100Mbps QPS 7497.77 阅读全文
posted @ 2023-12-20 18:35 冯元春 阅读(12) 评论(0) 推荐(0) 编辑
摘要: laravel框架 简单数据库查询 wrk -c1000 -t10 -d10s 127.0.0.1/api/index Running 10s test @ http://127.0.0.1/api/index/ 10 threads and 1000 connections Thread Stat 阅读全文
posted @ 2023-12-20 18:22 冯元春 阅读(4) 评论(0) 推荐(0) 编辑
摘要: ln -sf /www/server/php/73/bin/php /usr/bin/php 阅读全文
posted @ 2023-12-14 13:29 冯元春 阅读(7) 评论(0) 推荐(0) 编辑
摘要: <VirtualHost *:80> ServerAdmin webmaster@example.com DocumentRoot "/www/wwwroot/api.com" ServerName api.com ServerAlias api.com #errorDocument 404 /40 阅读全文
posted @ 2023-12-13 17:46 冯元春 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 语法之旅 https://tour.go-zh.org/basics/4 go入门指南 https://github.com/unknwon/the-way-to-go_ZH_CN/blob/master/eBook/directory.md https://learnku.com/docs/the 阅读全文
posted @ 2023-12-12 11:13 冯元春 阅读(2) 评论(0) 推荐(0) 编辑
摘要: cd /usr/local 下载二进制压缩包 wget https://golang.google.cn/dl/go1.18.linux-amd64.tar.gz 解压 tar -zxvf go1.18.linux-amd64.tar.gz go命令写入环境变量 echo "export PATH= 阅读全文
posted @ 2023-12-12 09:54 冯元春 阅读(2) 评论(0) 推荐(0) 编辑