# Service Granularity

#### Granularity Disintegrators

Granularity disintegrators provide guidance and justification for when to break a service into smaller parts. While the justification for breaking up service may involve only a single driver, in most cases the justification will be based on multiple drivers.

{% hint style="info" %}

* **Service scope and function**: is the service doing too many unrelated things?
* **Code volatility**: Are changes isolated to only one part of the service?
* **Scalability and throughput**: Do parts of the service need to scale differently?
* **Fault tolerance**: Are there errors that cause critical functions to fail within the service?
* **Security**: Do some parts of the service need higher security levels than others?
* **Extensibility**: Is the service always expanding to add new contexts?
  {% endhint %}

#### Granularity integrators

{% hint style="info" %}

* **Database transactions**: Is an ACID transaction required between separate services?
* **Workflow and choreography**: Do services need to talk to one another?&#x20;
* **Shared code**: Do services need to share code among one another?
* **Database relationship**: Although service can be broken apart, can the data it uses be broken apart as well?
  {% endhint %}


---

# 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://notebook.iuriioapps.com/architecture-and-design/service-granularity.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.
