# Update API - Async on server-side

**URL:** <https://discuss.elastic.co/t/update-api-async-on-server-side/274388>\
**Category:** Elasticsearch\
**Created:** [May 29, 2021, 7:25am UTC](https://discuss.elastic.co/t/update-api-async-on-server-side/274388 "2021-05-29T07:25:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leuteris](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leuteris/32/89009_2.png) [@Leuteris](https://discuss.elastic.co/u/Leuteris)\
**Post date:** [May 29, 2021, 7:25am UTC](https://discuss.elastic.co/t/update-api-async-on-server-side/274388/1 "2021-05-29T07:25:13Z")

</div>

Is it possible to execute the following request asynchronously on the server side?

```auto
POST test/_update/1
{
  "script" : "ctx._source.new_field = 'value_of_new_field'"
}

```

By "server side", I mean server should write the request to the translog and respond immediately before applying any changes(get doc, execute script, index doc) .

I am using the Java rest client.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 29, 2021, 7:32am UTC](https://discuss.elastic.co/t/update-api-async-on-server-side/274388/2 "2021-05-29T07:32:11Z")

</div>

I do not think that is possible. Why would you want to do that? What are you hoping to gain?

---

<div class="post-metadata">

**Author:** ![Leuteris](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leuteris/32/89009_2.png) [@Leuteris](https://discuss.elastic.co/u/Leuteris)\
**Post date:** [May 29, 2021, 7:53am UTC](https://discuss.elastic.co/t/update-api-async-on-server-side/274388/3 "2021-05-29T07:53:13Z")

</div>

What I try to achieve is to have high throughput on the client-side without delays.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 29, 2021, 8:03am UTC](https://discuss.elastic.co/t/update-api-async-on-server-side/274388/4 "2021-05-29T08:03:23Z")

</div>

If you want high throughput you should look at [this part of the docs](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/tune-for-indexing-speed.html). The most important tip for optimising throughput is to use bulk requests as lots of single index or update requests limits performance.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 26, 2021, 8:03am UTC](https://discuss.elastic.co/t/update-api-async-on-server-side/274388/5 "2021-06-26T08:03:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
