Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议 #2

Open
HopscotchSen opened this issue Jul 5, 2019 · 1 comment
Open

建议 #2

HopscotchSen opened this issue Jul 5, 2019 · 1 comment

Comments

@HopscotchSen
Copy link

1.gateway中不建议引入datasource依赖
2.gateway直接访问uaa服务来获得token相关信息
3.你的想法和我现在的很类似,外部是access_token,内部是jwt
希望多交流

@hiling
Copy link
Owner

hiling commented Apr 27, 2020

感谢,我开始也是将OAuth等放到网关外,独立的模块,这样更清爽一些。

后面考虑到小规模使用时,不想启用过多服务,所以就将两个合并起来了。

合并后的好处是网关和OAuth之间不需要跨网络或跨进程交互,可以直接在进程内交互,性能更好些。且我们只需要保证网关的高可用就行,不用启动过多服务再保证OAuth的高可用。

且OAuth的更新频率很低,合并后对网关的更新频率没有大的影响。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants