FRosner / cluster-broccoli

Self service for Nomad based on templates.
Apache License 2.0
60 stars 22 forks source link

Use cache for stuff stored in instance storage #352

Open FRosner opened 6 years ago

FRosner commented 6 years ago

Problem

Right now we store nomad and consul information about instances in a hash map inside the InstanceService. This is a potential memory leak.

I don't think it's a severe risk as with the current code base we actually always overwrite the info coming from Nomad / Consul. So as long as nobody changes the code we should be fine.

Solution

Use the play cache API with an appropriate TTL (e.g. double the nomad refresh time).