How Hemnet uses Cloudflare Workers to maximize engineering resources

Every week, more than 3 million apartment hunters, homebuyers, and real estate brokers flock to Hemnet, the most popular property portal in the world. With hundreds of thousands of property listings and a robust search function, the Sweden-based classified is the go-to-place for property buyers. More than 28.5 million searches per week are performed as users hunt for the perfect property.

For Hemnet, creating an efficient and powerful user experience is of the greatest importance. When creating a new section of the site dedicated to buying properties outside of Sweden, they decided to start this process by first considering users’ needs.

The challenge

When Swedish buyers want to buy a property outside of Sweden, they typically start by browsing around to find more information about a certain area and understand how the property market works in that country. The search behaviour is therefore fundamentally different from the one adopted when searching properties within Sweden. The main goal is finding good information about an area and a country, and from there, identifying a trustworthy agent who can be a supportive guide in the transaction.

This is why Hemnet decided to focus its Utland (Abroad) section on articles and inspiration centered on different regions, rather than directly listing properties on it.

“Instead of using our ‘normal’ platform, we wanted to create a standalone place where broker agencies and offices could list their services for different countries and regions,” says Christoffer Hamberg, Technical Director at Hemnet.

Rather than building this feature into their main Ruby on Rails application, Hemnet’s team decided to build out a static site generated by Gatsby, while using Contentful as the data source. To serve the site, they turned to Cloudflare Workers.

Hemnet goes global with serverless technology

Hemnet already used Cloudflare’s integrated security and performance solutions, and had been increasingly intrigued by the capabilities of their serverless platform, Cloudflare Workers. To Hamberg, this appeared to be the perfect use case.

Workers, a lightweight JavaScript execution environment, allows users to create, deploy, and scale serverless applications on the Cloudflare global network. Backed by a network that stretches across 200 cities and 90+ countries worldwide, each application is able to run in the data center that sits closest to the end user, reducing potential end-to-end latency and ensuring optimal performance and uptime.

With Workers and Page Rules working in tandem, Hemnet was able to set up Hemnet Utland on their main domain. Hemnet Utland allows buyers to connect with broker agencies outside of Sweden. The site maintains a list of broker agencies based in France, Spain, Portugal, and Italy, and supplements this service with short, informative articles about each region.

Not only did Workers help Hemnet reach their customers quickly and efficiently, but it also proved easy to configure, enabling Hemnet to save considerable time and internal resources as they launched the site.

“Cloudflare Workers (and the Page Rules) allowed us to quickly launch Hemnet Utland on our main domain without touching that code base,” Hamberg says. “A big plus was also the fact that a small product team was able to quickly build and set up the site with minimal help from the platform team, which typically handles new features and apps for us.”

Integrated security and performance solutions without vendor lock-in

Utilizing serverless technology is a major advantage for Hemnet, which strives to push the envelope in order to deliver an innovative and seamless user experience. As they continue to expand their properties, however, they also need to ensure that their sites remain fast and secure.

Hemnet uses the Cloudflare global CDN in tandem with security services like the Cloudflare Web Application Firewall (WAF) and Advanced DDoS Protection, which lets them protect their sites from incoming threats like malicious requests and volumetric DDoS attacks without seeing a significant increase in latency or degradation in user experience. Thanks to Cloudflare’s built-in DDoS protection, Hemnet is able to block over 100,000 threats every month.

Even as Hemnet relies on Cloudflare for integrated security, performance, and serverless solutions, they are able to mitigate vendor lock-in. Cloudflare acts as a layer of abstraction between client and vendor, empowering users to use the Cloudflare product stack in front of various types of infrastructure and cloud providers — without being forced to use bundled services from a single vendor that doesn’t meet all of their needs.

That makes all the difference to Hemnet, as they value the flexibility, long-term vision, and integrated solutions Cloudflare provides.

“Performance is a fundamental part of the user experience and Hemnet wants to provide a best-in-class experience for our users,” says Hamberg. “But above all comes the security aspect which we will never compromise on. Cloudflare allows us to deliver both to our users, ensuring that they can access our services in as fast and secure a manner as possible.”

How Hemnet uses Cloudflare Workers to maximize engineering resources
主な成果
  • Used Cloudflare Workers to launch Hemnet Utland from their main domain, while saving time and internal resources
  • Mitigates 100,000+ cyber threats every month with Cloudflare Advanced DDoS Protection

“Cloudflare Workers (and the Page Rules) allowed us to quickly launch Hemnet Utland on our main domain without touching that code base. A big plus was also the way our small product team was able to quickly build and set up the site with minimal help from our platform team.”

Christoffer Hamberg
Technical Director, Hemnet