Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support for IPv6 redis connections #1257

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/webapp/app/services/autoIncrementCounter.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ function getAutoIncrementCounter() {
username: env.REDIS_USERNAME,
password: env.REDIS_PASSWORD,
enableAutoPipelining: true,
// Force support for both IPv6 and IPv4, by default ioredis sets this to 4,
// only allowing IPv4 connections:
// https://github.com/redis/ioredis/issues/1576
family: 0,
...(env.REDIS_TLS_DISABLED === "true" ? {} : { tls: {} }),
},
});
Expand Down
4 changes: 4 additions & 0 deletions apps/webapp/app/services/rateLimiter.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export class RateLimiter {
username: env.REDIS_USERNAME,
password: env.REDIS_PASSWORD,
enableAutoPipelining: true,
// Force support for both IPv6 and IPv4, by default ioredis sets this to 4,
// only allowing IPv4 connections:
// https://github.com/redis/ioredis/issues/1576
family: 0,
...(env.REDIS_TLS_DISABLED === "true" ? {} : { tls: {} }),
}
),
Expand Down
4 changes: 4 additions & 0 deletions apps/webapp/app/services/runExecutionRateLimiter.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,10 @@ function getRateLimiter() {
username: env.REDIS_USERNAME,
password: env.REDIS_PASSWORD,
enableAutoPipelining: true,
// Force support for both IPv6 and IPv4, by default ioredis sets this to 4,
// only allowing IPv4 connections:
// https://github.com/redis/ioredis/issues/1576
family: 0,
...(env.REDIS_TLS_DISABLED === "true" ? {} : { tls: {} }),
},
defaultConcurrency: env.DEFAULT_ORG_EXECUTION_CONCURRENCY_LIMIT,
Expand Down
4 changes: 4 additions & 0 deletions apps/webapp/app/v3/eventRepository.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,10 @@ function initializeEventRepo() {
username: env.REDIS_USERNAME,
password: env.REDIS_PASSWORD,
enableAutoPipelining: true,
// Force support for both IPv6 and IPv4, by default ioredis sets this to 4,
// only allowing IPv4 connections:
// https://github.com/redis/ioredis/issues/1576
family: 0,
...(env.REDIS_TLS_DISABLED === "true" ? {} : { tls: {} }),
},
});
Expand Down
4 changes: 4 additions & 0 deletions apps/webapp/app/v3/handleSocketIo.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ function initializeSocketIOServerInstance() {
username: env.REDIS_USERNAME,
password: env.REDIS_PASSWORD,
enableAutoPipelining: true,
// Force support for both IPv6 and IPv4, by default ioredis sets this to 4,
// only allowing IPv4 connections:
// https://github.com/redis/ioredis/issues/1576
family: 0,
...(env.REDIS_TLS_DISABLED === "true" ? {} : { tls: {} }),
});
const subClient = pubClient.duplicate();
Expand Down
4 changes: 4 additions & 0 deletions apps/webapp/app/v3/marqs/devPubSub.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ function initializeDevPubSub() {
username: env.REDIS_USERNAME,
password: env.REDIS_PASSWORD,
enableAutoPipelining: true,
// Force support for both IPv6 and IPv4, by default ioredis sets this to 4,
// only allowing IPv4 connections:
// https://github.com/redis/ioredis/issues/1576
family: 0,
...(env.REDIS_TLS_DISABLED === "true" ? {} : { tls: {} }),
},
schema: messageCatalog,
Expand Down
4 changes: 4 additions & 0 deletions apps/webapp/app/v3/marqs/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1720,6 +1720,10 @@ function getMarQSClient() {
username: env.REDIS_USERNAME,
password: env.REDIS_PASSWORD,
enableAutoPipelining: true,
// Force support for both IPv6 and IPv4, by default ioredis sets this to 4,
// only allowing IPv4 connections:
// https://github.com/redis/ioredis/issues/1576
family: 0,
...(env.REDIS_TLS_DISABLED === "true" ? {} : { tls: {} }),
};

Expand Down
4 changes: 4 additions & 0 deletions apps/webapp/app/v3/marqs/v2.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ function getMarQSClient() {
username: env.REDIS_USERNAME,
password: env.REDIS_PASSWORD,
enableAutoPipelining: true,
// Force support for both IPv6 and IPv4, by default ioredis sets this to 4,
// only allowing IPv4 connections:
// https://github.com/redis/ioredis/issues/1576
family: 0,
...(env.REDIS_TLS_DISABLED === "true" ? {} : { tls: {} }),
};

Expand Down
4 changes: 4 additions & 0 deletions apps/webapp/app/v3/services/projectPubSub.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ function initializeProjectPubSub() {
username: env.REDIS_USERNAME,
password: env.REDIS_PASSWORD,
enableAutoPipelining: true,
// Force support for both IPv6 and IPv4, by default ioredis sets this to 4,
// only allowing IPv4 connections:
// https://github.com/redis/ioredis/issues/1576
family: 0,
...(env.REDIS_TLS_DISABLED === "true" ? {} : { tls: {} }),
},
schema: messageCatalog,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ function getTracker() {
username: env.REDIS_USERNAME,
password: env.REDIS_PASSWORD,
enableAutoPipelining: true,
// Force support for both IPv6 and IPv4, by default ioredis sets this to 4,
// only allowing IPv4 connections:
// https://github.com/redis/ioredis/issues/1576
family: 0,
...(env.REDIS_TLS_DISABLED === "true" ? {} : { tls: {} }),
},
});
Expand Down
Loading