I wanted to talk today about a few improvements we’ve done to our check-availability API functionality, also referred to as domain lookups.
In summary, we’ve made a number of improvements that will make check availability much faster, whether you’re using RWI or the NAME_SUGGEST API. If you’re integrating with our API now or in the future, NAME_SUGGEST is the call to use to take advantage of all the advanced features and speed improvements.
Warning: Geek Content Ahead
And, now, for geeks in the audience, here are a few more details…
Historically, lookups have been done sequentially in OpenSRS. Whether you were using the RWI or API, your choice was to request lookups one by one, or give us a number of TLDs, and we would check them one by one. In a Worst case scenario, you could wait as long as 60 seconds for lookup of all TLDs, name suggestions and premium names to be returned.
Well, that has all changed now. We’ve completely re-engineered the OpenSRS system for doing availability checks, and we’ve put a big honking internal lookup service in place that does number of pretty neat things:
- All that work that used to happen in sequence, is now happening in parallel behind the scenes.
- There is a new cache in place that stores previous lookups for a short period of time to enable very fast repeat searches.
- We pre-load and regularly update zone files from the most popular of registries, and make this information available to the system as secondary cache.
- Not only are all TLDs checked in parallel, but all related services are parallelized, including name suggestions and premium names lookups.
With the new system, we can handle over 8,000 concurrent requests, and have several hundred concurrent processes running at any given point. And this is just a beginning, as system is very scalable!
Working with our partners
To give you a sense of the painstaking engineering that went into this piece of the system, we worked hard with our name suggest partner on optimizing their API. By implementing our suggestions, they’ve cut average size of their API response from 177KB down to 0.6KB. Yes, there’s no typo there–that is less than 0.5% of initial size!
Additionally, we trimmed milliseconds wherever we could. The round-trip for name suggest call
has dropped from 1.1s to 0.5s, indicating that majority of this is processing time for name-suggestion engine spin.
What’s the payoff?
So what is the net result of all this? If you were to do lookup before for all gTLDs, ccTLDs, name suggestions and premium names, it would have taken about 60 seconds before. Today, with the new API system, you can expect back a complete set of results in around four or five seconds!
Basically, lookup nowadays will take as much time as slowest TLD. If you’re not selling all TLDs (and for reference .es and .in are some of the slowest we’ve seen), your response is likely to be even better that that. To get most often requested gTLDs, your experience will be around one or two seconds most of the time.
Max wait and search keys
And if you’re an API integrator, it gets better. When sending an API command, you can now specify the maximum amount of time you are willing to wait for results! We’ll time ourselves, and give you all the results we’ve been able to collect by that ‘deadline’. You can use this to make a really snappy interface at the expense of maybe not getting few results here and there.
I’ll follow up this post with another that will show you how to do it in the coming days.
As well, should you be building Ajax interface, you can make it both snappy and complete. Just send us two or three calls! With the first one give us one second, and get back the the fast gTLDs, and suggestions. Then redo the same query a few seconds later to pick up rest of the results. And maybe add one more call five seconds later, just in case…although the API will tell you if result set is complete, so you might not even need that last call.
In reality, there are number of strategies you can use with this feature, but I hope you see the potential. It’s powerful, but not complex, and it will enable you to build that snappy page, with a feel-good customer experience where things are just flying.