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
https://typesense.org
GNU General Public License v3.0
21.06k stars 651 forks source link

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

Closed is-jonreeves closed 6 months ago

is-jonreeves commented 6 months ago

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:

OS:

jasonbosco commented 6 months ago

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