Implementing the Health Check API Pattern with Rust

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • sqlx

    🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite. (by launchbadge)

  • In this blog post, we are going to implement the Health Check API pattern using the actix-web web framework that uses sqlx to connect to a local PostgreSQL database instance.

  • alacritty

    A cross-platform, OpenGL terminal emulator.

  • Let's go ahead and open your favorite Command-line terminal and create a new Cargo project via cargo new my-service --bin.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • rust

    Empowering everyone to build reliable and efficient software.

  • Before getting started make sure that you have Cargo and Rust installed on your machine. The easiest way to install these tools is to use rustup.

  • intellij-plugins

    Open-source plugins included in the distribution of IntelliJ IDEA Ultimate and other IDEs based on the IntelliJ Platform

  • Okay now that we have confirmed our service runs and we have an instance of PostgreSQL running locally, let's open up your favorite text editor or IDE and add our project dependencies to our Cargo.toml file.

  • tokio

    A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

  • For sqlx, we want to make sure we include the "postgres" feature during compilation, so we have PostgreSQL drivers to connect to our PostgreSQL database with. Next, we'll want to make sure we have the runtime-actix-native-tls feature included so that sqlx can support the actix-web framework which uses the tokio runtime. Finally, let's include serde and serde_json for serializing our Health Check API response body for later in the post.

  • sagan

    Discontinued The spring.io site and reference application

  • This /health API endpoint solution is an implementation of the Health Check API pattern, a pattern for checking the health of your API service. In web frameworks like Spring a drop-in solution like Spring Actuator is available for you to integrate into your Spring project. However, in many web frameworks you have to build this Health Check API behavior yourself.

  • Visual Studio Code

    Visual Studio Code

  • Okay now that we have confirmed our service runs and we have an instance of PostgreSQL running locally, let's open up your favorite text editor or IDE and add our project dependencies to our Cargo.toml file.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • actix-web

    Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.

  • In this blog post, we are going to implement the Health Check API pattern using the actix-web web framework that uses sqlx to connect to a local PostgreSQL database instance.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • The Linux Kernel Prepares for Rust 1.77 Upgrade

    9 projects | news.ycombinator.com | 18 Feb 2024
  • Top 10 Rusty Repositories for you to start your Open Source Journey

    11 projects | dev.to | 19 Dec 2023
  • Significant update within the `*-grants` ecosystem: crates to protect endpoints in widely used web frameworks.

    1 project | /r/rust | 1 Dec 2023
  • Introducing SQLPage : write websites entirely in SQL

    8 projects | /r/rust | 4 Jul 2023
  • Any working wgpu compute example that would run in a browser?

    2 projects | /r/rust | 10 Jun 2023