The Secret Life of HTTP(S) Calls in a Serverless World

Katie Poe Bayes
IOpipe Blog
Published in
4 min readJan 30, 2019

--

Find out what your application is doing when you’re not watching

Ponder the age-old question behind all observability tools: “What is my application doing?”

When we talk about serverless applications, we’re really specifying a way to define your data flows and wire each concern or set of concerns together with a function that happens to only run when needed. Those connections are what make a serverless app.

Fresh out of the box, IOpipe now enables auto-tracing of HTTP/S requests, so you can see what your application is doing and quickly drill down to areas that might need your attention.

We originally shipped auto-tracing for HTTP/S requests on every function invocation in early fall 2018, and followed up shortly after with a revamping of our function view to include at-a-glance statistics for each trace over time. Before enabling this feature by default, we automatically traced more than 10 billion calls.

We’re really into those fine details at IOpipe, but we’re firm believers in the equal importance of both finding an application’s most granular event details, and also being able to spot those medians and outliers quickly over multiple invocations, so you can know immediately when something is out of whack, and if it is, to jump quickly to specifically what’s going on.

With auto-tracing aggregations at the function level you don’t have to compare logs to find where that extra-long duration originated, because the responsible service will be right there in your face saying “it was me!”

Aggregated trace views make outliers obvious.

With toggling traces and sorting by trace durations, you can get into those nitty gritty details, answering the second age-old question in observability: “how do I fix this?” and maybe the third: “what (or who, let’s be honest) caused that?”

Here are a few of the common examples where we’re seeing the most impact of this feature amongst our users:

User-reported timeout

What do you do when a user reports a timeout on your website? Where do you even start? Rather than wading through individual invocation log files or trying to guess based on sampled data, organizations using IOpipe can sort by duration and instantly pinpoint which invocation timed-out and how many users were impacted.

To diagnose user-reported timeouts:

  1. We can see in this function that there were 17 timeouts happening.

2. Scrolling down the page, we see a list of invocations. Filter by errors to find the timeouts in question. Note that the duration of all of these invocations are around 4 seconds. Select one of these invocations that timed out to dig in deeper.

3. Click on the Tracing tab, and we’ll see a list of all the calls made in this invocation. At the very bottom the answer becomes clear. There was a call invoking another Lambda function `WildRyde-S3UploadFunc` that had no response, so this invocation timed out waiting for a response back from the other Lambda function.

Transaction didn’t ship

For our eCommerce and retail enterprise users who rely heavily on seasonal campaigns like Cyber Monday, transaction failures can cause serious headaches and severely impact both revenue and customer loyalty.

These users can’t afford delays in debugging. When a transaction doesn’t ship, auto-tracing enables them to find which trace didn’t complete and use it to identify the invocation that’s failing.

Users report slowness

53% of visits to mobile sites are abandoned after 3 seconds. If your application load times are giving users anxiety, it’s critical to be able to diagnose which function (or functions) are causing the slowdown. Again, sorting by duration and drilling down into the longest-running invocations will help you immediately identify the problem areas of your code or third party services that you may be relying on.

Want to try IOpipe and take autotracing for a spin? Our free-forever tier includes up to 1 million invocations a month across as many functions as you need. As your applications scale, we can scale with you.

If you’re already an IOpipe user, update your IOpipe libraries to the latest version and log into your dashboard. Then click on any updated function and you’ll find the trace data in the Function View.

--

--