All Projects â†’ kubukoz â†’ Sup

kubukoz / Sup

Licence: apache-2.0
Composable, purely functional healthchecks in Scala.

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to Sup

Monix
Asynchronous, Reactive Programming for Scala and Scala.js.
Stars: ✭ 1,819 (+1218.12%)
Mutual labels:  typelevel, cats, functional-programming, fp
Pfps Shopping Cart
🛒 The Shopping Cart application developed in the book "Practical FP in Scala: A hands-on approach"
Stars: ✭ 262 (+89.86%)
Mutual labels:  cats, functional-programming, fp
Hammock
Purely functional HTTP client
Stars: ✭ 174 (+26.09%)
Mutual labels:  typelevel, cats, fp
Shapeless
Generic programming for Scala
Stars: ✭ 3,207 (+2223.91%)
Mutual labels:  typelevel, functional-programming, fp
Eslint Plugin Functional
ESLint rules to disable mutation and promote fp in JavaScript and TypeScript.
Stars: ✭ 282 (+104.35%)
Mutual labels:  functional-programming, functional, fp
Doobie
Functional JDBC layer for Scala.
Stars: ✭ 1,910 (+1284.06%)
Mutual labels:  typelevel, functional-programming, fp
Monocle
Optics library for Scala
Stars: ✭ 1,357 (+883.33%)
Mutual labels:  typelevel, cats, functional-programming
Test State
Scala Test-State.
Stars: ✭ 119 (-13.77%)
Mutual labels:  cats, functional-programming, fp
Fkit
A functional programming toolkit for JavaScript.
Stars: ✭ 588 (+326.09%)
Mutual labels:  functional-programming, functional, fp
Cats Infographic
typeclass diagram for cats
Stars: ✭ 403 (+192.03%)
Mutual labels:  typelevel, cats, fp
Kotlin Result
A multiplatform Result monad for modelling success or failure operations.
Stars: ✭ 369 (+167.39%)
Mutual labels:  functional-programming, functional, fp
Stm4cats
STM monad for cats-effect
Stars: ✭ 35 (-74.64%)
Mutual labels:  cats, functional-programming, fp
Frameless
Expressive types for Spark.
Stars: ✭ 717 (+419.57%)
Mutual labels:  typelevel, functional-programming, fp
Skunk
A data access library for Scala + Postgres.
Stars: ✭ 1,107 (+702.17%)
Mutual labels:  typelevel, cats, functional-programming
Request Compose
Composable HTTP Client
Stars: ✭ 80 (-42.03%)
Mutual labels:  functional-programming, fp
Monix Bio
Asynchronous data type with typed errors.
Stars: ✭ 80 (-42.03%)
Mutual labels:  typelevel, functional-programming
Bulb
A reactive programming library for JavaScript.
Stars: ✭ 84 (-39.13%)
Mutual labels:  functional-programming, functional
Returns
Make your functions return something meaningful, typed, and safe!
Stars: ✭ 2,015 (+1360.14%)
Mutual labels:  functional-programming, fp
Request via
RequestVia: A Functional HTTP Client That Wraps Net::HTTP
Stars: ✭ 74 (-46.38%)
Mutual labels:  functional-programming, functional
Zio Logging
Simple logging for ZIO apps, with correlation, context & pluggable backends out of the box.
Stars: ✭ 85 (-38.41%)
Mutual labels:  functional-programming, fp

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 healthchecks.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].