Hacker News new | ask | show | jobs
by jimktrains2 2979 days ago
Why compare to another API endpoint? You should compare it against accessing a local database.
1 comments

Comparing a network call vs filesystem i/o wouldn't be a useful comparison for someone deciding between different third part API providers.
Why not? I can load an IP database locally, so it's an option and a "competitor" to a 3rd party API. That's what I'm comparing it to, not against other APIs.
It's pretty obvious that hitting your local disk is going to be a lot faster than making a network call. Make the right decision for your use case.
Maybe in this case. But historically, exactly this decision point has oscillated. It's caused reversals in distributed computer design for decades. First the networks were slow and disks were (relatively) fast - so each machine had one. Then networks went Ethernet, and disks started disappearing. Disks got down to a few ms access time and they came back. Then Gigabit came around. Then SSD.

Today I'd say it depends upon exactly what your network data source latency measures out to. The answer could go either way.

That's a pretty interesting history and put in that perspective I see what you mean and totally agree with you.