即使没有进行实际查询,NodeJS + Azure Cosmos DB(MongoDB API)也会不断生成IsMaster操作 [英] NodeJS + Azure Cosmos DB (MongoDB API) generates IsMaster operation constantly even when no actual queries being made

查看:138
本文介绍了即使没有进行实际查询,NodeJS + Azure Cosmos DB(MongoDB API)也会不断生成IsMaster操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个简单的NodeJS,它使用mongoose连接到Azure Cosmos DB(MongoDB API) 。该应用程序有2个调用一个用于发布和一个获取。

I have made a simple NodeJS that uses mongoose to connect to an Azure Cosmos DB (MongoDB API). The app have 2 calls one for post and one get.

我处于Azure Cosmos DB显示活动的情况,如下所示虽然没有触发我的API [见下图]。我收取了这笔费用。

I am in situation where the Azure Cosmos DB showing an activity as shown below even though none of my API are triggered [See image below]. And I am getting charged for this.

从图片中可以看到有一个IsMaster操作,每分钟被调用12次。这些请求仅在我停止应用时停止。

from the image you can see that there is an IsMaster operation that's being called 12 times per minutes. These requests stop only when I stop the app.

是否有人对此有所了解?

Does any one have an idea about this?

推荐答案

Hi WhatTheHeckIsThis ,

Hi WhatTheHeckIsThis,

您是在运营区域部署还是全球部署? 

Are you running a regional or global deployment? 

验证您的区域设置

您可以从Mongo Shell运行以下命令:

You can run the following from a Mongo Shell:

db.isMaster()

输出如果已部署多区域,将生成列出主机值的输出,其中一个被指定为主节点或主节点。 IsMaster流程是一项后台任务,您不应直接向其收费...除非您设置了多区域

The output will generate output that lists host values where one is designated as the master or primary, if you have multi-region deployed. The IsMaster process is a background task that you should not be billed for directly...unless you have multi-region set-up.

如果您不使用Mongo Shell,但使用REST,您可以利用REST响应标头来识别CRUD操作的RU费用,并将其与整体RU消费信息进行比较。 

If you are not using the Mongo Shell but using REST instead, you can leverage the REST response headers to identify RU charges for CRUD operations, and compare that with the overall RU consumption information. 

常见的Azure Cosmos数据库REST响应标头

使用  x-ms-request-charge标题。

Use the x-ms-request-charge header.

我希望这有帮助,如果您有其他问题,请告诉我们。

I hope this helps and please let us know if you have additional questions.

~Mike


这篇关于即使没有进行实际查询,NodeJS + Azure Cosmos DB(MongoDB API)也会不断生成IsMaster操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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