0

Since I want the schema creation in Nebula Graph Database to be almost synchronized, what if I set heartbeat_interval=1, will it lead to any severe consequences?

The schema and indexes are created asynchronously, we don't know when the creation will be finished, so I think it is better to be synchronous.

1 Answers1

0

DDL in NebulaGraph(for now 3.3.0) was designed to be async, and normally we(in the worst-case scenario) need to wait for 2 heartbeats to expect schema change to be fanout to all parties.

Changing the heartbeat into a too-short interval may risk too much overhead of the network yet service status is too sensitive on network flappings.

While I would say a heartbeat value in 1(sec): heartbeat_interval_secs=1 is generally acceptable, you could go with that and observe the cluster for a while to see if things go well enough in your network environment, spec, and traffic pattern, which could vary.

If possible, before NebulaGraph introduces the sync DDL, I would suggest in the application layer to implement an optimistic exponential backoff DML prob after any related DDL, where initial sleep time is around 2 heartbeat intervals and when the initial DML failed, just do the retry then.

Wey Gu
  • 575
  • 1
  • 6
  • 11