看云托管的文档
// 返回值同 wx.request
const res = await c1.callContainer({
path: '/container-helloworld', // 填入容器的访问路径(云托管-服务列表-路径)
// 其余参数同 wx.request
method: 'POST',
})
是通过http调用服务的,但是不知道内部实现是否支持http2,比如头部压缩,对于多人在线的小游戏来说,网络资源太宝贵了,如果不支持http2的头部压缩的话,会浪费大量网络资源
https://developers.weixin.qq.com/miniprogram/dev/api/network/request/wx.request.html
enableHttp2: true,
可以开启使用Http2,另外
enableQuic: true,
可以开启使用Http3
等等 还有其他性能优化,比如DNS缓存、HTTP客户端缓存等等,https://github.com/letwang/HookPHP/ 已经亲测,性能很高。