Getting doc by _id is slow

i am using the _id to get doc in curl like time curl http://host:port/index/type/id , but the time cost can be vary much from 2ms~200ms, a time cost of 200ms is not ok for my situation where ~10ms will be wanted. i am wondering how this comes. can anyone explain the detail of getting doc by _id, or how can i fasten the doc getting by _id? thanks in advance.

Are you accessing docs that are frequently updated or have just been indexed? Which ES version is this? Does performance improve when using time curl http://host:port/index/type/id?realtime=false

the docs i am accessing will not be updated after writing with only one key been indexed. the ES version i am using is 6.8.3. according to the es docs, doesn't the realtime=false slow down the performance?

Curl need to establish a new connection per request which adds overhead, while most client libraries use long running connections to avoid this. If possible I would recommend you create a small script and see what impact eliminating connection setup from the request path has.