有什么方法可以配置Firestore数据库? [英] Is there any way to profile firestore database?

查看:52
本文介绍了有什么方法可以配置Firestore数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Firestore数据库中的实体写入次数很高.

大多数路径中的写权限都是受限制的,这是使用admin SDK从后端服务器完成的.只有极少数路径具有写访问权限-特别是仅针对(在特定组中经过身份验证和注册并加入并批准的)用户,因此,尽管滥用的方式显然很薄,但仍难以明确识别. /p>

我唯一看到的方法是-在每次写入时执行Cloud Functions,并让该函数记录要分析的路径.但这会带来更多的成本和复杂性.

是否有任何方式/建议来监视/配置在哪里(即路径)和(UID或任何身份)执行写操作?有一些针对 RTDB 的工具,但找不到任何东西用于Firestore.

我还想知道是否有任何方法可以在滥用情况下自动限制IP/用户(即-高读写率)?

解决方案

我目前正在做的是 firestore控制台=>菜单用法=>查看用法 我看到这样的东西:

它与分析器不同,但总比没有好.

我还在关注下面链接上的视频,看看是否有人提供答案.人们也要求探查器. https://www.youtube.com/watch?v=9CObBsjk6Tc

I am getting very high counts of Entity Writes in my firestore database.

Write permission in most of the paths are restricted, done from back-end server using admin SDK. Only a very few paths have write access- specifically only to the users who are (authenticated & registered & joined and approved in a specific group), so even though the ways to abuse are apparently thin, yet hard to specifically identify.

Only way I see- is to execute Cloud Functions on every write, and have the function log the paths somewhere to analyze. But that introduces further costs and complexity.

Is there any way/recommendation to monitor/profile where (i.e.- path) and who (UID or any identity) are performing the writes? There are tools to do such for RTDB, bu't can't find anything for Firestore.

I am also wondering if there is any way to restrict ip/users automatically in case of abuse (i.e.- high rate of read/write)?

解决方案

What I'm currently doing is going to firestore console => menu usage => view usage and I see something like this:

It's not the same as the profiler, but better than nothing.

I'm also keeping an eye on the video on the link below to see if someone provides an answer. People are asking for the profiler too. https://www.youtube.com/watch?v=9CObBsjk6Tc

这篇关于有什么方法可以配置Firestore数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆