Spotlight: Ashley Peacock (Author) Interview and AMA!

Serverless: Simplifying Development
with Ashley Peacock
@ashleypeacock

What if your apps could scale effortlessly, handle global requests with ease, and let you focus on writing great code instead of wrestling with infrastructure? That’s the promise of serverless computing, and Ashley Peacock, software engineer and author, wants to help you unlock its potential.

With two books under his belt, including Serverless Apps on Cloudflare, Ashley’s mission is clear: to demystify serverless computing and show developers how to harness it to build powerful, cost-effective applications.

We caught up with Ashley to talk about his journey and his passion for teaching others how to succeed with serverless apps.

INTERVIEW

Watch the complete interview here:

WIN!

We’re giving away one of Ashley’s books to one lucky winner! Simply post a comment or a question in his ask me anything (AMA) below, and the Devtalk bot will randomly pick a winner at a time of the author’s choosing . . . then automatically update this thread with the results!


INTERVIEW (abridged)

Introducing Ashley

Ashley Peacock is a staff engineer and architect based in the UK with over a decade of experience in the tech industry. A self-proclaimed Cloudflare enthusiast, Ashley is captivated by its simplicity and developer-focused design. He’s confident that Cloudflare is on track to become the most widely-used cloud platform in the world.

Whether it’s simplifying serverless development or championing clear communication through diagrams, Ashley’s focus remains on making complex ideas approachable and actionable.

On the concept of serverless . . .

Ashley distills the concept of serverless to this: “You pay for what you use. So if you use one request, you pay for one request.” Serverless scales to zero, so if you have no requests, there is no cost. Unlike traditional setups where you’re tied to maintaining and scaling infrastructure, serverless frees you from those burdens. It’s about eliminating overhead and letting you focus on building great features.

For developers, that means applications that automatically scale to handle demand, whether you’re serving ten users or ten million. Ashley’s book introduces you to this world step-by-step, guiding you from basic serverless functions to full-fledged applications using Cloudflare’s tools.

On choosing Cloudflare . . .

With Cloudflare’s innovative approach to serverless, cold starts are nearly eliminated, and you get a seamless development experience. Comparing it to other options, “(With AWS) if you want to connect a Lambda that is running, say, a Postgres database and it’s not serverless, you need VPCs and IP addresses and all sorts of complexity. Whereas with Cloudflare, it feels like everything is baked in; everything you need is kind of offloaded to the platform,” Ashley says.

One of the biggest benefits? It’s fast and “just works out of the box,” Ashley explains. Using Cloudflare’s emulation tools, developers can run their entire serverless stack on their local machine before deploying globally with a single command.

On the value of incremental adoption . . .

If you are new to serverless, Ashley recommends starting with a simple function, like deploying a basic Cloudflare Worker. Introduce additional components like databases, caches, and APIs as “building blocks” when you are ready to create increasingly complex applications. This is the same approach he takes in the book, adding features like caching and object storage to the example serverless application as your learning journey progresses.

On the developer experience . . .

Cloudflare empowers developers by providing tools that remove complexity, streamline workflows, and enhance productivity. Ashley compares it to earlier tools like Heroku, known for their developer-friendly approach. “I think back in the day, if you were doing Ruby and Rails, you would reach for something like Heroku. Everyone was like, ‘Oh, it’s so easy; I just run one command to deploy my Rails app.’ It’s very similar to Cloudflare, where it’s a really good place for people to start with serverless. Or even if you’re just starting programming in general, and you’re learning JavaScript, it’s a really good place to deploy stuff super quick.”

On tracking down issues . . .

Due to the dynamic nature of the environment, you might suppose that tracking down issues, like a performance glitch, might be more difficult. But Ashley points out, Cloudflare has “the same tools that you use on any platform to look at things like memory or logging. You can use all those same tools with Cloudflare.”

On vendor lock-in . . .

Vendor lock-in is a valid concern with serverless technologies, but you can address some of that by abstracting external service interactions. For example, when you use a ports-and-adapters architecture, changes are limited to the adapter rather than your entire application. That way “if you need to change it, you’re only changing that adapter,” he explains.

The bigger challenge, Ashley notes, often lies in the data. Moving large datasets between providers is “time-consuming, expensive, and difficult,” especially when serving live users during the transition. He emphasizes the importance of using the right tool for the job for the best results.

On when not to use serverless . . .

Ashley sees serverless as the direction of the future for most applications. While there will be edge cases, like when you need lots of memory, serverless is poised to dominate due to its versatility and rapid growth capabilities.

“You pay for what you use and it’s very cost effective,” he reminds us. “Most applications are going to benefit from Cloudflare…you pay for actual CPU cycles. You don’t pay for wall time, where wall time is the amount of time your request took.” When apps call APIs, the calls take two or three seconds each. “On AWS for example, you’ll be charged for the full duration of that request. With Cloudflare, you might only use a millisecond of CPU time.” That means you’ll be charged much less.

“But in terms of things I wouldn’t use it for, it is those highly computationally expensive things,” Ashley muses. “If you need to encode an entire podcast, you’re probably not gonna wanna do that on Cloudflare. And same for memory. If you want to run your own AI model, you probably are not going to be doing that on Cloudflare. You can run a bunch of AI models with Cloudflare’s global inference product, Workers AI, but you can’t yet run your own custom models.”

But really, “the vast majority of applications that you build, they’re made up of some front ends, some static content, some APIs and some storage, some caches, some queues, whatever it might be. It has the bread and butter for the vast majority of applications.”


Now that you know his story, complete your collection of Ashley’s PragProg titles today! Don’t forget to use coupon code devtalk.com to save 35 percent on one of Ashley’s ebooks:


Follow Ashley:

Mastodon, @ashleypeacock

X, @_ashleypeacock

Linkedin, ashley-peacock-133749120

Medium, @ashley-peacock


YOUR TURN!

We’re now opening up the thread for your questions! Ask Ashley anything! Please keep it clean and don’t forget that by participating you automatically enter the competition to win one of Ashley’s ebooks!