Is it true that workers cannot create TCP connections?

my question is , can cloudflare use tcp connection to connect to remote redis server?
is it only limited to http protocols?

otherwise, can you provide mysql and/or redis examples?

Correct. If you need to use a datastore from a Worker you’d need to use KV.

1 Like

http is a tcp connection by itself.
possible for me to use http port 80 as redis / mysql protocol and convert it from within the workers program?

Thanks for clarifying that HTTP uses TCP :wink:

Apart from the fact, that this is not true for HTTP 3 any more, your question was obviously geared towards arbitrary TCP connections and these are not possible with Workers. HTTP requests are obviously possible and if you can wrap your $SERVICE into HTTP you’ll be able to call it from a Worker, but then we are not talking about TCP but about standard HTTP requests instead.

And there’s actually a similar thread at Can we use redis with worker for store data using KV?

1 Like