The data from this benchmark is generated based on data generator from https://github.com/feast-dev/feast-benchmarks.
To install requirements:
poetry install
To activate shell:
poetry shell
Run Redis instance using a Docker container:
docker-compose up -d
To apply changes to registry:
cd registry
feast apply
After running this command, the file registry/registry.db
is updated.
To materialize data to Redis instance:
feast materialize 2024-05-03 2024-05-04
Go back to root folder cd ..
so you can start the server.
uvicorn server.server:app --workers 2 --log-level critical
Some example commands to request the server:
curl "http://localhost:8000/get_online_features"
Changing the feature service:
curl "http://localhost:8000/get_online_features?feature_service=feature_service_1"
Changing the batch size (number of entity rows):
curl "http://localhost:8000/get_online_features?feature_service=feature_service_1&batch_size=100"
curl "http://localhost:8000/get_online_features_async"
Changing the feature service:
curl "http://localhost:8000/get_online_features_async?feature_service=feature_service_1"
You can use wrk
or any other load test tool to benchmark the server.
brew install wrk
To start the benchmark execution for sync endpoint:
wrk --threads 4 --latency "http://localhost:8000/get_online_features?feature_service=feature_service_1"
To start the benchmark execution for async endpoint:
wrk --threads 4 --latency "http://localhost:8000/get_online_features_async?feature_service=feature_service_1"