top | item 37065082

Ask HN: How can Kagi be so fast and customizable?

20 points| completeshock | 2 years ago

Each customization I do to Kagi means the next search query has to be totally different. That might mean the UI also has to change to add/remove things that certainly require an index/DB search.

And yet, I always get sub 200ms first-byte responses.

How is that even possible? Is that edge computing? How would you architect such a thing?

15 comments

order

ecf|2 years ago

Well this is easy. Kagi is fast because of how strictly they limit the number of searches one can perform.

Take the standard, $5 plan. It gives you 300 searches PER MONTH. That’s 10 per day. I’m sure most of us do 10 searches within minutes while working.

Terretta|2 years ago

I don't buy that. I think it's the first order "free vs. paid", not the limits.

I can't picture anyone willing to spend any money for better search quality consciously adjusting their personal search behavior because of the price difference in Kagi tiers per number of searches.

In other words, these quantity limits don't change behavior, other than abusive/exploitative behavior (e.g. account sharing, bots, etc.).

Instead, I would guess just the "free vs. fee" discriminator cuts enough users it enables not having to serve an infinitely long tail of freeloaders with a lowest common denominator SERP.

ezekg|2 years ago

I've been on their $10 paid tier since the day it launched and have yet to hit the limit. Total searches this month is at 311. I use Kagi on desktop for work and on mobile for personal.

I bet you're overestimating your search volume. (I know I did when I first subscribed -- I was nervous I'd hit the limit in a day.)

necovek|2 years ago

I am pretty sure I don't do 10 searches that quickly: I usually start a day by going to known places, email and continuing where I left off yesterday. That's rarely "I was just going to look something up" point.

Still, getting a single, customized, full web search done in 200ms is impressive: scaling that to more requests is easier today with scale-out (for this particular problem type, which is basically read only) than getting that single search to perform.

PartiallyTyped|2 years ago

I had posted the number of my searches not too long ago; last January I hit about 4.5k; or on average 1 search every 10 minutes every day for the whole month.

smcleod|2 years ago

I’m sure part of it is secret source but Vlad (CEO) is a lovely, helpful chap - I’m sure if you dropped an open question on the Kagi forums, he or someone else might be able to point you to some of the technologies or patterns used.

necovek|2 years ago

Edge computing would ensure that latency is the same in all regions: eg. if they could get it down to 30ms somewhere, they could get it to 30ms everywhere (kind of, ofc).

Your singular case does not really prove much: maybe you are just in the same area their DC is?

Still, a full, customized web search result in 200ms (though, first byte is not really indicative of that) would be impressive.