# Handling timeout in case of counter bin

**URL:** https://discuss.aerospike.com/t/handling-timeout-in-case-of-counter-bin/5196
**Category:** General Discussion
**Created:** [May 20, 2018, 5:47am UTC](https://discuss.aerospike.com/t/handling-timeout-in-case-of-counter-bin/5196 "2018-05-20T05:47:21Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![rbotzer](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/rbotzer/32/2114_2.png) [@rbotzer](https://discuss.aerospike.com/u/rbotzer)
#### Post date: [May 21, 2018, 4:42pm UTC](https://discuss.aerospike.com/t/handling-timeout-in-case-of-counter-bin/5196/2 "2018-05-21T16:42:57Z")

</div>

For counters you’d use the [optimization](https://www.aerospike.com/docs/architecture/primary-index.html#single-bin-optimization) of [data-in-index](https://www.aerospike.com/docs/operations/configure/namespace/storage/index.html#recipe-for-a-hdd-storage-engine-with-data-in-index-engine) storage, which places the 8B integer in the [primary index](https://www.aerospike.com/docs/architecture/primary-index.html) metadata entry. This means you don’t spend an extra 8B on top of the initial 64B of metadata. Also, the read/write operations don’t have to first find the metadata in the primary index, then skip to the storage location in DRAM - it happens in place, which means much lower latency.

For in-memory namespaces, if you want to push latencies down further, you should be making use of more sprigs in your configuration ([`partition-tree-sprigs`](https://www.aerospike.com/docs/reference/configuration/#partition-tree-sprigs)) and CPU pinning ([`auto-pin`](https://www.aerospike.com/docs/reference/configuration/#auto-pin) `true`).

> [@FAQ - What are sprigs](https://discuss.aerospike.com/t/faq-what-are-sprigs/4936):
>
> The Aerospike Knowledge Base has moved to [https://support.aerospike.com](https://support.aerospike.com). Content on [https://discuss.aerospike.com](https://discuss.aerospike.com) is being migrated to either [https://support.aerospike.com](https://support.aerospike.com) or [https://docs.aerospike.com](https://docs.aerospike.com). Maintenance on articles stored in this repository ceased on December 31st 2022 and this article may be stale. If you have any questions, please do not hesitate to raise a case via [https://support.aerospike.com](https://support.aerospike.com). FAQ - What are sprigs An Aerospike cluster has 4096 partitions per namespace, and ke…

Read up on the [request flow](https://stackoverflow.com/questions/44075490/aerospike-design-request-flow-internals-resources/44338136#44338136) for the standard Aerospike configuration is such that every update locks the record before modifying it. The node with the master partition of the record will communicate the replica write to the node(s) with replica partitions of the record. Only after the local write and the replica writes are accepted does the client get back a success on the write.

If you have multiple Aerospike nodes, and are concerned about consistency in the rare event of a cluster splitting, you should be reading up on the [strong consistency mode](https://www.aerospike.com/blog/aerospike-4-strong-consistency-and-jepsen/) of Aerospike Enterprise Edition 4. You have both Linearizable Strong Consistency and Sequential Strong Consistency as [consistency modes](https://www.aerospike.com/docs/architecture/consistency.html) to choose from.

If you feel skeptical about a system you don’t know, you should be doing two things. First, educate yourself - I provided documentation for you to read. Second, test it for yourself. The community can help you with configuration tips. You have the [`asbenchmark`](https://www.aerospike.com/docs/tools/asbenchmark/index.html) tool (in the [tools package](https://www.aerospike.com/download/tools/3.15.3.6/)) to assist you with testing your cluster’s performance after you configure it.

---

_[View the full topic](https://discuss.aerospike.com/t/handling-timeout-in-case-of-counter-bin/5196)._
