-
Notifications
You must be signed in to change notification settings - Fork 1
/
fly.toml
62 lines (54 loc) · 2.63 KB
/
fly.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
app = "FILL_IN_YOUR_WARPSTREAM_APP_NAME"
# Set whatever region you prefer here: https://fly.io/docs/reference/regions/
primary_region = "atl"
kill_signal = "SIGINT"
kill_timeout = "1m0s"
[build]
[env]
# For the Agents to report IP6 IP addresses for internal communication between them within the
# fly.io network because fly.io does not support IP4 internally.
WARPSTREAM_ADVERTISE_HOSTNAME_STRATEGY = "auto-ip6"
# This is required because otherwise the Agent's will advertise their internal fly.io IP6
# address to the service discovery system for the Kafka service, but this IP address is
# not routable from outside of your fly.io VPC.
WARPSTREAM_DISCOVERY_KAFKA_HOSTNAME_OVERRIDE = "YOUR_APP_NAME.fly.dev"
# This one is not required, but is included in case you want to expose the Kafka protocol
# on a port besides 9092 externally.
WARPSTREAM_DISCOVERY_KAFKA_PORT_OVERRIDE = "9092"
# The value for this can be found in the "Virtual Clusters" section of the WarpStream admin
# console.
WARPSTREAM_DEFAULT_VIRTUAL_CLUSTER_ID = "FILL_ME_IN_FROM_WARPSTREAM_ADMIN_CONSOLE"
# Fill this in with values for your S3 bucket. The example uses Cloudflare R2, but any S3-compatible
# object store will work.
WARPSTREAM_BUCKET_URL = "s3://FILL_ME_IN_BUCKET_NAME?s3ForcePathStyle=true®ion=auto&endpoint=https://FILL_ME_IN_ENDPOINT.r2.cloudflarestorage.com"
# Make sure the Agents will enforce authentication.
WARPSTREAM_REQUIRE_AUTHENTICATION = "true"
[[services]]
# Agents will listen for Kafka traffic on port 9092 by default.
protocol = "tcp"
internal_port = 9092
processes = ["app"]
[[services.ports]]
# Expose Kafka on port 9092 externally as well, and ask fly.io to perform TLS termination
# for us.
port = 9092
handlers = ["tls"]
[services.concurrency]
type = "connections"
# The rationale here is that we don't want fly.io to take "closeness" into account for load
# balancing purposes at all, at least not when we're deployed within a single region. Instead,
# we want fly.io to focus exclusively on keeping the number of connections amongst the agents
# as even as possible. Therefore we set the soft_limit to 0 so all the agents look like they're
# over their soft limit which encourages fly.io to route new connections to the least loaded
# instance instead of the closest one.
hard_limit = 1000
soft_limit = 0
[[services.tcp_checks]]
grace_period = "5s"
interval = "15s"
timeout = "5s"
[metrics]
# Collect prometheus metrics automatically.
port = 8080
path = "/metrics"