Connect to Redis on Cloudflare Workers
I'm getting this error when trying to connect to a simple redis instance:
How can I simply connect to Redis on my Cloudflare instance? My code is simple:
https://github.com/jdgamble555/redisgraph-graphql-sveltekit/blob/master/src/lib/server/redis.ts
How can I get this to work?
J
GitHub
redisgraph-graphql-sveltekit/redis.ts at master · jdgamble555/redis...
Contribute to jdgamble555/redisgraph-graphql-sveltekit development by creating an account on GitHub.
3 Replies
You can’t really do this today outside of some kind of http adapter for redis, like upstash.
Socket workers will allow you to do this
What are socket workers? Will this allow me to connect to http? Where do I find them?
They’re not something you can use yet, but soon. https://blog.cloudflare.com/introducing-socket-workers/
The Cloudflare Blog
Making connections with TCP and Sockets for Workers
The ability to make TCP and QUIC client connections from within Workers and Durable Objects, as well as the ability to connect to Workers over TCP and QUIC without using HTTP, will be coming to Cloudflare Workers. Here’s a peek at what we’re working on.