Git Product home page Git Product logo

sampleapp's People

Contributors

bmangalaganesh avatar

Watchers

 avatar  avatar

Forkers

bmangalaganesh

sampleapp's Issues

Deregister a service

We need to manage de-registration of services.
Broadly there are two options

  1. In Consul 0.7 and later, checks that are associated with a service may also contain an optional deregister_critical_service_after field, which is a timeout in the same Go time format as interval and ttl. If a check is in the critical state for more than this configured value, then its associated service (and all of its associated checks) will automatically be deregistered. [https://www.consul.io/docs/agent/checks.html]
  2. Deregister when the container stops. I see two options here:
    1. Can we run a clean up script when the docker stop is executed?
    2. The SIGTERM signal is passed to processes in the container. If we can trap this signal, then we can deregister the service. For example a script looping with a trap which runs a cleanup function on SIGTERM and SIGINT

Option 1. is easier to implement, but has two significant problems. It will leave the registry in a stale state until the critical timeout is reached and it could cause http timeouts and slow response as the stopped service instances won't be detected until the consul runs the health check against that service instance.

Option 2. is better but requires more work to customise the container and is more intrusive on the DevOps. As we are already injecting a goreman procfile to register the service, this would be one extra modification.

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.