Hacker News new | ask | show | jobs
Ask HN: How can Kagi be so fast and customizable?
20 points by completeshock 1039 days 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?

4 comments

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.

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.

Since I'm using Kagi Search, my search behavior indeed has changed - not because I adjusted it but because the search results have been consistently better than with other engines, leading to fewer searches.
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.)

Why not drop to $5 per month and pay the 1.5 cents for anything over 300?
I'm 12 days into this month. Last month I did 1,003 searches. Before that, 842. I also despise usage based billing. I like the flat $10 even if I don't hit the hard limit I have configured.
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.

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.

    Aug 2023   3xx
    Jul 2023  10xx
    Jun 2023  15xx
    May 2023   8xx
    Apr 2023  25xx
    Mar 2023  35xx
    Feb 2023  35xx
You've got to be top 0.1% or something of the population. You're a total outlier.
How do you get any meaningful work done? What are you searching? Big outlier imo.
It was the month I had to submit my thesis.. the flow is rather simple; search, skim, search again, until an answer has been found. I can hit 5-6 queries in 1 minute. Then spend the rest of the time reading the content I found.
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.
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.