cheat.sh
cheat.sh copied to clipboard
Long request times
It looks like responses can take a long time as theres no CDN etc for the service? Responses from Australia can take from 1100-2700ms plus.
I wouldn't even mind hosting the docker image on my own domain if this isn't something me/the community could help out with.
@andrewgodman The question is, do you have such response times for cached answers too? Say, what happens if you do the same query twice:
$ curl cht.sh/ls
$ time curl cht.sh/ls
Because new questions, that can't be answered from the cache, take a couple of seconds anyway
And to your question about your own server in Australia, it would be great if we could use it. We could make geo-based DNS resolution, so that DNS queries coming from Australia will get IP address of your server, when resolving cheat.sh
and cht.sh
2nd request: curl cht.sh/ls 0.01s user 0.01s system 0% cpu 3.867 total
My home internet isn't fast, I can try in the office tomorrow as it's on a pretty low latency fibre connection.
I'm happy to spin something up as long as the bandwidth costs aren't too high :)
Yes, it is very slow. It can't be that slow:
That's how it looks like from Europe:
$ time curl cht.sh/ls
# Displays everything in the target directory
ls path/to/the/target/directory
# Displays everything including hidden files
ls -a
# Displays all files, along with the size (with unit suffixes) and timestamp
ls -lh
# Display files, sorted by size
ls -S
# Display directories only
ls -d */
# Display directories only, include hidden
ls -d .*/ */
real 0m0.075s
user 0m0.010s
sys 0m0.005s
Additional problem that you probably have is that you don't use your own local DNS server, and even for DNS queries you have to use something external. This adds to your RTT.
Could you just ping cheat.sh and check what RTT you have?
RTT is looking about 300-500ms. My DNS is set to my isp's dns. However they are known for their crappy routing.
Running a time in the office was a bit better: curl cht.sh/ls 0.01s user 0.01s system 1% cpu 0.642 total.
RTT is stable at 311ms. Routing from Au to Europe is really bad at times as some ISPs have to route via USA due to limited supply to EU from here. I'd be keen to help out getting some local instances spun up if the costs aren't too high. Is it just a docker image?
Just wondering if you had any thoughts on deploying the service overseas? I'm happy to spin up a container but I'm a bit unsure how you are deploying it as I note the container is mostly for local/dev
@andrewgodman Yes it would be great.
- Could we make the service publicly available?
- Do you need a docker image?