DEV Community

loading...

Discussion on: What's your most commonly used serverless function ?

Collapse
jeremylikness profile image
Jeremy Likness ⚡️

My entire link shortening infrastructure is serverless. The endpoints look like this:

  • An HTTP trigger serves a web page that lets me paste in links and target mediums (like Twitter, LinkedIn, etc.)
  • An HTTP trigger ingests a JSON payload and uses table storage to map the full URL to a short code
  • An HTTP trigger accepts a short code and redirects to the full URL, while placing metadata about the click on a queue
  • A queue trigger processes the metadata and inserts into Cosmos DB so I can stand up a Power BI analytics dashboard
  • A timer trigger fires a logic app that finds referrals from Twitter and matches them to the original tweet so I can analyze twitter activity

I wrote a series about it here: Serverless Link Shortener