Modern serverless search is just an accounting trick. There鈥檚 a hidden pool of nodes behind the API, and the final bill is split evenly among all clients. There鈥檚 always a standby warm node waiting for your request - you just don鈥檛 see it.And you can鈥檛 get rid of it because scaling search engines is HARD (or at least search vendors want you to think so). You can鈥檛 just put one into a Lambda function. But what if you actually can?As someone who has hated Elasticsearch since version 0.89 (but still uses it), there are three major blockers to running it in a truly serverless mode:Container size: It鈥檚 around 700MB in version 9.x. The bigger the container, the slower the node startup, since it has to be pulled from somewhere.Container startup time: For ES 9.x, the startup time alone is about 40 seconds. And the time-to-performance is much worse, since a cold JVM is painfully slow until it sees some traffic.Index and state: Search engines like Elastic and Qdrant behave like databases, with each node hosting a fraction of the total cluster state. When a new node joins, the cluster needs to rebalance. What happens if you scale-to-zero? Better not ask.We鈥檙e going to take my pet-project-gone-big search engine, Nixiesearch, and squeeze it into an AWS Lambda:It鈥檚 also JVM-based, since it uses Apache Lucene for all search-related internals (Like OpenSearch, Elasticsearch and SOLR). We鈥檙e going to build a native x86_64 binary with GraalVM native-image: this should reduce the Docker image size (no JVM!) and eliminate JVM warmup entirely.Can we store an index outside the search engine? Can we achieve reasonable latency with AWS S3? What if we host the index on AWS EFS instead?You may wonder why do we ever need to perform weird AWS Lambda tricks when we can just keep the status quo with warm stand-by nodes? No warm-up, no cold-start, no obscure limits - it鈥檚 a good traditional approach.Because doing weird stupid things is the way I learn. So the challenge is to have a proof-of-conce...
First seen: 2025-11-24 16:22
Last seen: 2025-11-24 18:22