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

通过influx-proxy如何实现用户管理,测试过程中查询正常,写入有问题。如何实现呢? #84

Open
nmonz opened this issue Jun 25, 2019 · 10 comments

Comments

@nmonz
Copy link

nmonz commented Jun 25, 2019

No description provided.

@shell909090
Copy link
Owner

用户管理?influx-proxy不管理用户啊。

@nmonz
Copy link
Author

nmonz commented Jun 26, 2019

@shell909090 意思还是说influx-proxy如何实现通过验证鉴权,将数据写入后端

@yeyuqiu
Copy link

yeyuqiu commented Dec 29, 2019

我也遇到相同的问题,查询正常,写入不成功,我的influxdb有创建用户

@shell909090
Copy link
Owner

查询的用户是穿透的,写入的用户无法穿透。
最简单的办法是去掉用户。后段的一切操作都是influx-proxy代为实施,分用户并没有什么必要。
次之是等我metainline这个br写完合并。

@nmonz
Copy link
Author

nmonz commented Dec 30, 2019 via email

@shell909090
Copy link
Owner

influx-proxy是一个将多个influx综合成一个的项目。如果你有多个租户,每个租户的性能要求都需要多台influx才能支撑。那么你应该启动多组influx-proxy实例,每组配套一批后端influx。反之,如果你的租户性能要求不需要多台influx来支撑,那么跳过influx-proxy直接使用influxdb即可。

@nmonz
Copy link
Author

nmonz commented Dec 30, 2019 via email

@shell909090
Copy link
Owner

??
如果两个租户,每个租户的性能要求需要两台influx支撑,那就是需要四台机器啊。
如果两个租户,每个租户的性能一台influx就可以支撑,每人开一台influx就好了,为什么要用proxy?

@nmonz
Copy link
Author

nmonz commented Dec 30, 2019 via email

@shell909090
Copy link
Owner

influx-proxy的作用是将多个请求根据measurement分割到多个机器上,总体表现上看,就如同增强了N倍的性能。但这个实际上对提高并发并没有作用。因为同样的请求必然转给同样的服务器,因此当并发量翻倍的时候,同一个机器受到的压力也是翻倍的。influx-proxy最大的意义是可以在一个逻辑数据库中支撑非常复杂的指标系统,例如200-300个measurements,将他们分散到十数台机器上,同时用户感知上就如同一个数据库一样。这也是为什么你说开多租户的时候我很诧异的原因,因为influx-proxy的设计完全和这个目标背道而驰。
另外,如果要防止单台宕机,就需要将写入数据同时写入到两台influx中。这会消耗两倍以上的资源。所以如果每个租户的性能一台influx就可以支撑,加上双写的约束后,就需要两台机器。两个租户需要四台机器。确实是翻倍的。

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

3 participants