mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-03 01:38:46 +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
29 lines
781 B
HCL
29 lines
781 B
HCL
data "aws_iam_policy_document" "assume_ec2" {
|
|
statement {
|
|
actions = ["sts:AssumeRole"]
|
|
principals {
|
|
type = "Service"
|
|
identifiers = ["ec2.amazonaws.com"]
|
|
}
|
|
}
|
|
}
|
|
|
|
resource "aws_iam_role" "node" {
|
|
name = "${var.name}-node"
|
|
assume_role_policy = data.aws_iam_policy_document.assume_ec2.json
|
|
}
|
|
|
|
resource "aws_iam_role_policy_attachment" "ecr_read" {
|
|
role = aws_iam_role.node.name
|
|
policy_arn = "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly"
|
|
}
|
|
|
|
resource "aws_iam_role_policy_attachment" "ssm" {
|
|
role = aws_iam_role.node.name
|
|
policy_arn = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
|
|
}
|
|
|
|
resource "aws_iam_instance_profile" "node" {
|
|
name = "${var.name}-node"
|
|
role = aws_iam_role.node.name
|
|
}
|