> For the complete documentation index, see [llms.txt](https://boost.filecoin.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boost.filecoin.io/v1/experimental-features/local-index-directory/architecture.md).

# Architecture

When designing the Local Index Directory we considered the needs of various Storage Providers (SPs) and the operational overhead LID would have on their systems. We built a solution for:\
\- small- SPs - holding up to 1PiB), and\
\- mid- and large- size SPs - holding anywhere from 1PiB, up to 100PiB data

Depending on underlying block size and data format, index size can vary in size. Typically block sizes are between 16KiB and 1MiB.

At the moment there are two implementations of LID:\
\- a simple LevelDB implementation, for small SPs who want to keep all information in a single process database.\
\- a scalable YugabyteDB implementation, for medium and large size SPs with tens of thousands of deals.

## Index types

In order to support the described retrieval use cases, LID maintains the following indexes:

#### multihash → \[]piece cid

To look up which pieces contain a block

#### piece cid → sector information {sector ID, offset, size}

To look up which sector a piece is in

#### piece cid → map\<mulithash → block offset / size>

To look up where in the piece a block is and the block’s size

<figure><img src="/files/S8yNlusqyv6OoyTSdlni" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/3nxExOzXC0I67UhbyAC5" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://boost.filecoin.io/v1/experimental-features/local-index-directory/architecture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
