Giter VIP home page Giter VIP logo

Comments (7)

jakommo avatar jakommo commented on July 25, 2024

In general I'm 👍 on this as 30gb usually is a good size for a shard with this type of data.
I'm wondering though how long it will take to reach 30gb. If it takes a year, then it might make things more complicated, i.e. if a mapping change is necessary

from homeassistant-elasticsearch.

legrego avatar legrego commented on July 25, 2024

That's a good point...I imagine it would take quite some time to hit the 30gb mark, for most installations. For my own indices, I'm seeing ~150mb per 1 million documents

image

from homeassistant-elasticsearch.

legrego avatar legrego commented on July 25, 2024

pinging @dsztykman, since you had the original suggestion for 30gb. Do you have any thoughts on this?

from homeassistant-elasticsearch.

dsztykman avatar dsztykman commented on July 25, 2024

Agreed it's a bit of an issue, we should maybe think of a new indices names with versioning included like hass-events-v1-XXX and then whenever we change the mapping we create a new version and with aliases we can manage this way.
Otherwise we're going to end up with too many shards and too little data and the performance is going to suffer in the long term.
The question is how do we detect a change in mapping from home assistant directly?
Like adding a new device ?

from homeassistant-elasticsearch.

legrego avatar legrego commented on July 25, 2024

I like the idea of versioning the index names.

The question is how do we detect a change in mapping from home assistant directly?
Like adding a new device ?

My goal for the index mapping is to be device agnostic. It shouldn't care which devices are registered, or how many devices exist.
I think the only times the mapping should change are:

  1. Defects in the mapping. I've encountered this as more people use the plugin with various configurations. See also #32
  2. ES version compatability: if supporting the next major version requires changes to the mapping
  3. Enhancement requests

So essentially, I only expect the mapping to change if this plugin requires it, or if Elasticsearch requires it. The individual installations shouldn't have any bearing on the mapping, so we should only have to bump the version as a result of a changes to this plugin.

from homeassistant-elasticsearch.

dsztykman avatar dsztykman commented on July 25, 2024

Make sense so essentially change the version and the mapping when we receive an error from ES

from homeassistant-elasticsearch.

legrego avatar legrego commented on July 25, 2024

A bit off-topic for this PR, but if you're interested in seeing/reviewing the versioning idea, I have a PR up for #32 which incorporates this: #40

from homeassistant-elasticsearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.