Give us feedback on our roadmap in this 5 minute form! →
Give us feedback on our roadmap in this 5 minute form! →

Go feature server benchmarks

  • July 19, 2022
  • Felix Wang

Background

The Feast team published a blog post several months ago with latency benchmarks for all of our online feature retrieval options. Since then, we have built a Go feature server. It is currently in alpha mode, and only supports Redis as an online store. The docs are here. We recommend teams that require extremely low-latency feature serving to try the Go feature server. To test it, we ran our benchmarks against it; the results are presented below.

Benchmark Setup

See https://github.com/feast-dev/feast-benchmarks for the exact benchmark code. The feature servers were deployed in Docker on AWS EC2 instances (c5.4xlarge, 16vCPU, 64GiB memory).

Data and query patterns

Feast’s feature retrieval primarily manages retrieving the latest values of a given feature for specified entities. In this benchmark, the online stores contain:

  • 25 feature views (with 10 features per feature view) for a total of 250 features
  • 1M entity rows

As described in RFC-031, we simulate different query patterns by additionally varying by number of entity rows in a request (i.e. batch size), requests per second, and the concurrency of the feature server. The goal here is to have numbers that apply to a diverse set of teams, regardless of their scale and typical query patterns. Users are welcome to extend the benchmark suite to better test their own setup.

Online store setup

These benchmarks only used Redis as an online store. We used a single Redis server, run locally with Docker Compose on an EC2 instance. This should closely approximate usage of a separate Redis server in AWS. Typical network latency within the same availability zone in AWS is < 1-2 ms. In these benchmarks, we did not hit limits that required use of a Redis cluster. With higher batch sizes, the benchmark suite would likely only work with Redis clusters. Redis clusters should improve Feast’s performance.

Benchmark Results

Summary

  • The Go feature server is very fast (e.g. p99 latency is ~3.9 ms for a single row fetch of 250 features)
  • For the same number of features and batch size, the Go feature server is about 3-5x faster than the Python feature server
    • Despite this, there are still compelling reasons to use Python, depending on your situation (e.g. simplicity of deployment)
  • Feature server latency…
    • scales linearly (moderate slope) with batch size
    • scales linearly (low slope) with number of features
    • does not substantially change as requests per seconds increase

Latency when varying by batch size

For this comparison, we check retrieval of 50 features across 5 feature views.

At p99, we see that Go significantly outperforms Python, by ~3-5x. It also scales much better with batch size.

Batch size
1102030405060708090100
Python7.2315.1423.9632.8041.4450.4359.8894.57103.28111.93124.87
Go4.323.886.098.1610.1312.3214.316.2818.5320.2722.18

Latency when varying by number of requested features

The Go feature server scales a bit better than the Python feature server in terms of supporting a large number of features:

p99 retrieval times (ms), varying by number of requested features (batch size = 1)

Num features
50100150200250
Python8.4210.2813.3616.6945.41
Go1.782.432.983.333.92