# MongoDB vs Databaseless

MongoDB is the database used to store persistent data such as guild data, feeds, old articles (for comparisons to see what is old and new) and blacklists.

Databaseless is when no database is used - allowing the bot to be deployed quicker with no database dependency, but at the expense of some features.

## The Differences

The differences are summarized below - otherwise, they are identical.

### MongoDB

Used by setting a [MongoDB URI](https://docs.mongodb.com/manual/reference/connection-string/) in [`config.database.uri`](https://github.com/synzen/Discord.RSS/wiki/Configuration), or if you're using Docker, the env variable `DRSS_DATABASE_URI`.

* Data stored in database
* Articles missing during bot downtime are delivered upon next startup

### Databaseless

Used by setting a folder path in [`config.database.uri`](https://github.com/synzen/Discord.RSS/wiki/Configuration), or if you're using Docker, the env variable `DRSS_DATABASE_URI`. Both relative and absolute paths are accepted. For example, `"./drss"` or `"/data/drss"`.

* Web interface is unavailable
* Data is stored as JSON files
* Articles missed during bot downtime are not delivered
* Destabilizes after thousands of JSON files
* Web interface is not supported
* Statistics as seen in the `stats` command
* The following configs have no effect:
  * `config.database.connection`
  * `config.database.articlesExpire`
  * `config.database.deliveryRecordsExpire`
  * `config.feeds.sendOldOnFirstCycle`
  * `config.feeds.cycleMaxAge`
  * `config.feeds.articleDailyChannelLimit`

**Memory use will increase during the bot's lifetime as more articles are sent since they are stored in memory for reference to decide whether future articles are new or old.**

## What should I use?

MongoDB as originally intended. However, because MongoDB only officially supports 64-bit OS, databaseless may be your only choice if your system is not 64-bit.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.monitorss.xyz/configuration/mongodb-vs-databaseless.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
