• Stars
    star
    184
  • Rank 207,562 (Top 5 %)
  • Language
    Scala
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Composable, purely functional healthchecks in Scala.

sup

Join the chat at https://gitter.im/sup-scala/community Build Status Latest version Maven Central License

Powered by cats Gluten free

'sup (/sʌp/) provides composable, purely functional healthchecks.

"com.kubukoz" %% "sup-core" % supVersion

Check out the microsite and the usage guide.

Why?

If your application has any external dependencies, its ability to work properly relies on the availability of these dependencies. Most applications communicate with at least one database, and sometimes a service provided by someone else (e.g. Amazon S3, PayPal and so on). It's also common to talk to a message broker (Kafka, RabbitMQ, ActiveMQ, etc.). In the microservice world, your applications will probably talk to each other, as welll.

The last thing you want to happen is some other system's problem causing downtime in yours. We're living in a world where the network isn't reliable, and even healthy services can fail to respond to your requests due to network issues at any time.

By relying on systems living beyond your application's control, you reduce your SLA to the lowest SLA of your dependencies. Even if your application has nine nines of availability (99.9999999%) on its own, but it requires S3 (with uptime of 99.9%) to be up, your application is only available for 99.9% of the time.

Because of the risk associated with external services, modern applications employ a range of fault tolerance and isolation mechanisms, like circuit breakers, rate limiters and bulkheads. To ensure that our applications handle failure properly, and that we can react to problems in the system knowing what exactly doesn't work, we also track its health by monitoring, tracing and other diagnostics.

We also use health checks.

Health checks

The health check pattern usually involves having an API endpoint that reports the health of your application, including the health of each external dependency. It's reasonable that the information the endpoint exposes be cached and automatically refreshed, and protected by a circuit breaker to ensure that checking the health doesn't make matters worse.

Goals of this project

The main goal of sup is to provide a reusable model for working with health checks, as well as a range of utilities for customizing them by e.g. adding timeouts or error recovery. It also provides implementations for health checks of some popular integrations (JDBC, HTTP, etc.).

It's a design decision not to include any sort of metrics, response times, version information or other statistics in sup - they are simply beyond the scope of health checks. Although some of these can be implemented by users and used with sup, they're not officially supported.

Another design decision is that health is binary - a service is either healthy or not, and there's no "unknown" state.

Code of conduct

This project supports the Scala code of conduct and wants communication on all its channels (GitHub etc.) to be inclusive environments.

If you have any concerns about someone's behavior on these channels, contact Jakub Kozłowski.

More Repositories

1

slick-effect

Making Slick more functional with cats-effect.
Scala
69
star
2

brick-store

Typelevel Brickstore
Scala
55
star
3

steve

Scala
52
star
4

spotify-next

Small CLI app for filtering out music on Spotify.
Scala
45
star
5

flawless

WIP Delightful, purely functional testing no-framework. Don't even try to use it at work!
Scala
36
star
6

smithy-playground

Tooling for interactive experimentation of Smithy services
Scala
28
star
7

videos

Scala
26
star
8

datas

Abusing higher-kinded types to generate SQL.
Scala
25
star
9

advent-of-code

My solutions for Advent Of Code since 2015!
Scala
21
star
10

calico-smithy4s-demo

Scala
17
star
11

error-control

Scala
11
star
12

talks

My talks
JavaScript
10
star
13

dropbox-demo

A showcase project for my talk about typelevel stack architecture.
Scala
10
star
14

MIO

My playground implementation of an IO monad.
Scala
9
star
15

nix-config

Nix
8
star
16

smithy4s-course

Scala
7
star
17

comp-benchmark-runner

Benchmarking compilation speeds across several Scala projects on MacBook Pros I have available at home
Scala
7
star
18

debug-utils

Scala
6
star
19

scala-cli.nix

A Nix derivation for https://github.com/virtuslab/scala-cli.
Nix
6
star
20

catharsis

Utilities for cats-effect that don't really fit in the upstream.
Scala
5
star
21

caliban-http4s-ce3

A template project for building GraphQL applications with http4s/CE3/Caliban and Scala 3.
Scala
5
star
22

drops

Cats-based library for dropping tables into your terminal.
Scala
4
star
23

badlang

badlang
Scala
4
star
24

slang

Slang (short for shitpostlang) is a fun language I'm making to get hilarious content for Twitter shitposts.
Scala
4
star
25

infinidash4s

3
star
26

angular-on-hold

Mousedown interval event handler directive.
3
star
27

coffee

My collection of resources, information and adjustments for the coffee I brew.
3
star
28

flake-templates

Nix
3
star
29

scala-mock-technical-interview

Code accompanying a collab video I made with @marcinkrykowski!
Scala
3
star
30

dualshock4s

Scala
3
star
31

hmm

"Home Manager" Manager (hmm, hm²).
Rust
2
star
32

whenisrain

A web app that tells you when it's gonna rain. Or shine.
JavaScript
2
star
33

vivalidi

[abandoned] A crazy man's effect-agnostic validations for Scala DTOs
Scala
2
star
34

trellocat

A tool for copying your Trello boards to GitHub projects.
Scala
2
star
35

scetris

Pure functional Tetris implementation.
Scala
2
star
36

smithy4s-nix

Nix utilities for working with smithy4s.
Nix
2
star
37

progle

really simplistic game for guessing programming languages
Scala
2
star
38

scala-kafka-cqrs-es

WIP demo application
Scala
2
star
39

nix-yo-code

Nix
2
star
40

b2s-demo

Scala
1
star
41

todomeda

TypeScript
1
star
42

scala-3-final-demo

Scala
1
star
43

given-repro

Scala
1
star
44

polskibus-api

Polski Bus scraped API
Scala
1
star
45

tagless-slick

Experimenting with Tagless Final and slick
Scala
1
star
46

demos

1
star
47

graalvm-native-ce3

Scala
1
star
48

playground

Scala
1
star
49

vscode-nickel-syntax

Nix
1
star
50

lmp10

Groff
1
star
51

tapir-demo

Scala
1
star
52

swaggins

[retired] OpenAPI -> Scala model generator I wrote in 2018-2019.
Scala
1
star
53

scala-midi-fun

Scala
1
star
54

http4s-rickroll

Scala
1
star
55

scala-cli-nix

1
star
56

blursed

just reserving a name for a library you'll simultaneously love and hate
1
star
57

scala-nix-fun

Nix
1
star
58

fury-playground

Trying to get cats and other nice things to build using https://fury.build
Scala
1
star
59

scalawave-scalaz-cats

JavaScript
1
star
60

akka-remote-responder

Simple setup for a remote configuration of Akka.
Scala
1
star
61

beckon

Scala
1
star
62

scala3-live

Scala
1
star
63

spotimap

Growing project using Spotify's Web API
Scala
1
star
64

scala-99

My solutions for the "99 Scala problems" challenge.
Scala
1
star
65

daniels-regex-interpreter

Scala
1
star
66

derives-repro

Scala
1
star
67

scala-cli-preloaded

Dockerfile
1
star
68

someone

Someone™️ should do this.
1
star