re: Wrote a very fast URL shortener VIEW POST


I am curious. Why would file io be any faster than database?

I would be more convinced if you use something like memcache.


The reason for that is that I'm hosting it on a SSD and the only DBMS I currently have at hand is stored on another server, with imposed TLS auth (PgSQL configured for security).

Also, like I answered to another one, I really didn't care about speed when I made it.

When I've been able to test, and I imagine it to be expected as I was the only one using it, I really had blazingly-fast results.

We'll see in the long run how it handles !

(Also, using a PHP caching extension may be a good idea).


Running a database on your current server probably is the best option. I wondered that because you state "very fast" in your title. And when I read on, you uee file IO. And it contradicts so much that I can't stop wonder.

Sadly, it's currently on a small server I have no root control on, and which doesn't have a lot of storage space.

Still, good point

code of conduct - report abuse