# Self-host Elasticsearch VS. Cloud

**URL:** <https://discuss.elastic.co/t/self-host-elasticsearch-vs-cloud/163293>\
**Category:** Elasticsearch\
**Created:** [January 8, 2019, 3:01am UTC](https://discuss.elastic.co/t/self-host-elasticsearch-vs-cloud/163293 "2019-01-08T03:01:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anson1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anson1/32/46385_2.png) [@Anson1](https://discuss.elastic.co/u/Anson1)\
**Post date:** [January 8, 2019, 3:01am UTC](https://discuss.elastic.co/t/self-host-elasticsearch-vs-cloud/163293/1 "2019-01-08T03:01:57Z")

</div>

Hi,

I have got a single ELK stack with a single node running in a vagrant virtual box on my machine. It has 3 indexes which are 90mb, 3.6gb, and 38gb.

At the same time, I have also got a Javascript application running on the host machine, consuming data from Elasticsearch which runs no problem, speed and everything's perfect. (Locally)

The issue comes when I put my Javascript application in production, as the Elasticsearch endpoint in the application has to go from localhost:9200 to [MyDomainName.com:9200](http://MyDomainName.com:9200). The speed of the application runs fine within the company, but when I access it from home, the speed drastically decreases and often crashes. However, when I go to Kibana from home, running query there is fine.

The company is using BT broadband and has a download speed of 60mb, and 20mb upload. Doesn't use fixed IP so have to update A record whenever IP changes manually, but I don't think is relevant to the problem.

Is the internet speed the main issue the affected the loading speed outside of the company? How do I improve this? Is cloud (CDN?) the only option that would make things run faster? If so how much would it cost to host it in the cloud assuming I would index a lot of documents in the first time, but do a daily max. 10mb indexing after?

## Metrics from sending a request from Home using Chrome \> Network tool

```
Queued at 32.77s
Started at 32.77s

Resource Scheduling
- Queueing 0.37 ms

Connection Start
- Stalled 38.32s
- DNS Lookup 0.22ms
- Initial Connection 

Request/Response
- Request sent 48 μs
- Waiting (TTFB) 436.61.ms
- Content Download 0.58 ms

```

Thanks

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 8, 2019, 9:00am UTC](https://discuss.elastic.co/t/self-host-elasticsearch-vs-cloud/163293/2 "2019-01-08T09:00:23Z")

</div>

Those numbers look reasonable, except for this:

> [@Anson1](#):
>
> ```auto
> - Stalled 38.32s
> 
> ```

What does that mean? At what point were things stalled for ~40 seconds?

---

<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:** [February 5, 2019, 9:00am UTC](https://discuss.elastic.co/t/self-host-elasticsearch-vs-cloud/163293/3 "2019-02-05T09:00:27Z")

</div>

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