TTL for time series indexes
You should use time series indexes rather than the TTL function. Given that you care about the last 30-minute windows of documents, create a new index every 30 minutes using a date / time based naming convention: ie. docs-201309120000, docs-201309120030, docs-201309120100, docs-201309120130, etc. (Note the 30 minute increments in the naming convention.)
Using the Elasticsearch index aliases function ( http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/ ), you can add the docs alias to the last created index so that when you index, for example, a large volume, you always use the alias docs , but they will be recorded, for example, on docs-201309120130 .
When prompted, you must filter the datetime field to ensure that only the last 30 minutes of documents are returned, and you will need to query the last two created indexes to ensure that you get the full 30 minutes of documents - you can create another alias here to specify into two indexes, or simply query directly for two index names.
In this model, you do not have the overhead of using TTL, and you can simply delete the old unused indexes more than an hour ago.
There are other ways to improve indexing speed and query speed, but I think that removing TTL will be the biggest gain, your indexes will have a limited amount of data to filter / query, which should provide good speed acceleration.
Search settings (e.g. memory, etc.)
Here are some settings that I usually configure for servers with ES - http://pastebin.com/mNUGQCLY , note that this is only for 1 GB of VPS, so you will need to adjust.
Node roles
The "vs" and "client" ES node types can help you - http://www.elasticsearch.org/guide/reference/modules/node/
Index Settings
When doing bulk inserts, consider changing the values as index.refresh_interval index.merge.policy.merge_factor - I see that you changed refresh_interval to 5s , but think about setting it to -1 before the volume indexing operation, and then return to the desired interval. Or just think of doing a manual _refresh API attack after your bulk operation, especially if you only do voluminous inserts every minute - this is a controlled environment in this case.
By index.merge.policy.merge_factor to a higher value, the amount of segment merging performed by ES in the background is reduced, and then it returns to the default by default after the bulk operation restores normal behavior. Parameter 30 usually recommended for bulk inserts, and the default value is 10 .