# Creating advanced functions

## Allocation Tags <a href="#id-0-toc-title" id="id-0-toc-title"></a>

By default, DuploCloud spreads the container replicas across the hosts. By virtue of allocation tag the user can pin a container to a set of hosts that have a specific tag. Click on the edit icon next to allocation tag under host.

`AllocationTags` as key is already pre-populated, configure the value of your choice for example `"highmemory;highcpu"` or `"serviceA"` and click on save on the left. Then, when creating a service, set the allocation tag value to be a substring of the above tag, for example `highmemory` or serviceA. The allocation algorithm tries to pick a host where `AllocationTag` specified in the service is a substring of the `AllocationTags` of the host.

![](/files/BdZxDEIiwRDEAxwO4PRk)


---

# 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.duplocloud.com/docs/~/changes/i1ah7lBvMELea01fsIga/extras/creating-advanced-functions.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.
