typesense / typesense

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

Home Page:https://typesense.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Is it possible to disable peering and run in standalone mode?

is-jonreeves opened this issue · comments

Description

When running a single instance of typesense I see a lot of logs that look related to peering that seem unnecessary. I was wondering if I'm missing an option to disable clustering/peering to avoid this extra work, and suppress these messages.

...
14:44:53.896927   165 raft_server.cpp:693] Term: 2, pending_queue: 0, last_index: 9, committed: 9, known_applied: 9, applying: 0, pending_writes: 0, queued_writes: 0, local_sequence: 88
14:44:53.897065   207 raft_server.h:60] Peer refresh succeeded!
14:45:03.900120   165 raft_server.cpp:693] Term: 2, pending_queue: 0, last_index: 9, committed: 9, known_applied: 9, applying: 0, pending_writes: 0, queued_writes: 0, local_sequence: 88
14:45:03.900260   211 raft_server.h:60] Peer refresh succeeded!
14:45:13.904104   165 raft_server.cpp:693] Term: 2, pending_queue: 0, last_index: 9, committed: 9, known_applied: 9, applying: 0, pending_writes: 0, queued_writes: 0, local_sequence: 88
14:45:13.904237   207 raft_server.h:60] Peer refresh succeeded!
14:45:23.904724   165 raft_server.cpp:693] Term: 2, pending_queue: 0, last_index: 9, committed: 9, known_applied: 9, applying: 0, pending_writes: 0, queued_writes: 0, local_sequence: 88
14:45:23.904853   211 raft_server.h:60] Peer refresh succeeded!
...

Steps to reproduce

  1. Run a single typesense instance via Docker Compose with the following ENVs specified:
    • TYPESENSE_DATA_DIR
    • TYPESENSE_API_ADDRESS
    • TYPESENSE_API_PORT
    • TYPESENSE_API_KEY

Expected Behavior

No verbose logging related peering

Actual Behavior

Logs about peering every 10s

Metadata

Typesense Version:

  • 26.0

OS:

  • Docker Compose

No, it's not possible to disable Raft on a single node. It's baked in.