Giter VIP home page Giter VIP logo

akka-http-health's Introduction

Build Status

akka-http-health

Library for adding /health endpoint checks for Akka Http applications.

Provides a default /health endpoint that checks:

  • that the memory state is healthy
  • that there is enough available disk space

A load balancer like AWS ELB can be configured to call the health endpoint and it could decide to destroy any unhealthy instances.

Getting Started

Adding the dependency

sbt 0.13.6+

resolvers += Resolver.bintrayRepo("lhotari","releases")
libraryDependencies += "io.github.lhotari" %% "akka-http-health" % "1.0.3"

Simple use

The route instance created by calling io.github.lhotari.akka.http.health.HealthEndpoint.createDefaultHealthRoute() will handle /health with default settings. Append that route instance to the desired route binding.

Because of security concerns, it is generally adviced to serve the health endpoint on a separate port that isn't exposed to the public.

Advanced use

For customization, use the trait io.github.lhotari.akka.http.health.HealthEndpoint and override protected methods. Calling the createHealthRoute() method creates the route instance.

Contributing

Pull requests are welcome.

Some basic guidelines:

  • A few unit tests would help a lot as well - someone has to do that before the PR gets merged.
  • Please rebase the pull request branch against the current master.
  • When writing a commit message please follow these conventions.
  • If you are fixing an existing issue please add Fixes gh-XXXX at the end of the commit message (where XXXX is the issue number).
  • Add the license header to each source code file (see existing source code files for an example)

Contact

Lari Hotari

License

The library is Open Source Software released under the MIT license. See the LICENSE file for details.

akka-http-health's People

Contributors

hieronx avatar lhotari avatar

Watchers

 avatar  avatar

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.