解决方案:
微信鉴权等作为单独的server,对外提供服务. 用grpc通信
golang库: https://github.com/chanxuehong/wechat.v2/blob/master/mp/core/access_token_server.go 重写AccessTokenServer
方案:https://cnodejs.org/topic/57b330b6670139eb7bf6fd4c
1.redis有2个功能:第一是用作token的缓存,第二是作为锁媒介2.利用事件队列缓存请求过程:1.redis作为缓存,缓存住token2.每次请求判断token是否过期2.1 如果token未过期,则直接使用2.2 如果token过期,则利用redis的setnx(只能设置不存在的key)