mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-01 01:18:34 +00:00
Adds litellm-rust/loadtest: a mock LLM (OpenAI chat, Anthropic messages, Bedrock invoke with event-stream framing) that takes its timing from the prompt, an open-loop load generator with workloads covering 10k to 1M token contexts, 6 minute non-streaming calls and 30 minute streams, a config and virtual key generator, a summarizer and a /proc sampler, plus Terraform for an AWS rig with load generators, gateway and mocks on separate machines The gateway sets TCP_NODELAY on accepted sockets, removing a ~40 ms stall per streamed response, and its Docker build takes LTO and CODEGEN_UNITS build args for faster iteration builds
33 lines
1.1 KiB
HCL
33 lines
1.1 KiB
HCL
resource "random_password" "db" {
|
|
count = var.create_postgres ? 1 : 0
|
|
length = 32
|
|
special = false
|
|
}
|
|
|
|
resource "aws_db_subnet_group" "keys" {
|
|
count = var.create_postgres ? 1 : 0
|
|
name = var.name
|
|
subnet_ids = [aws_subnet.main.id, aws_subnet.db_secondary.id]
|
|
}
|
|
|
|
resource "aws_db_instance" "keys" {
|
|
count = var.create_postgres ? 1 : 0
|
|
identifier = var.name
|
|
engine = "postgres"
|
|
engine_version = "16"
|
|
instance_class = var.postgres_instance_class
|
|
allocated_storage = 50
|
|
storage_type = "gp3"
|
|
db_name = "litellm"
|
|
username = "litellm"
|
|
password = random_password.db[0].result
|
|
db_subnet_group_name = aws_db_subnet_group.keys[0].name
|
|
vpc_security_group_ids = [aws_security_group.rig.id]
|
|
availability_zone = local.az
|
|
skip_final_snapshot = true
|
|
apply_immediately = true
|
|
}
|
|
|
|
locals {
|
|
database_url = var.create_postgres ? "postgresql://litellm:${random_password.db[0].result}@${aws_db_instance.keys[0].address}:5432/litellm" : ""
|
|
}
|