Serverless Streaming At Scale with Azure SQL

%3CLINGO-SUB%20id%3D%22lingo-sub-1849317%22%20slang%3D%22en-US%22%3EServerless%20Streaming%20At%20Scale%20with%20Azure%20SQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1849317%22%20slang%3D%22en-US%22%3E%3CP%3E%3CEM%3EThis%20article%20was%20originally%20published%20by%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F206444%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3EDavide%20Mauri%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eto%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sql%2Fbg-p%2FAzureSQLBlog%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3EAzure%20SQL%20blog%3C%2FA%3E.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22%22%3EJust%20before%20Ignite%2C%20a%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcustomers.microsoft.com%2Fen-us%2Fstory%2F843823-rxr-realty-reopens-for-business-using-azure-iot%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Every%20interesting%20case%20study%20done%20with%20RXR%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ehas%20been%20released%2C%20where%20they%20showcased%20their%20IoT%20solution%20to%20bring%20safety%20in%20building%20during%20COVID%20times.%20It%20uses%20Azure%20SQL%20to%20store%20warm%20data%2C%20allowing%20it%20to%20be%20served%20and%20consumed%20to%20all%20downstream%20users%2C%20from%20analytical%20application%20to%20mobile%20clients%2C%20dashboards%2C%20API%20and%20business%20users.%20If%20you%20haven%E2%80%99t%20done%20yet%2C%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fmyignite.microsoft.com%2Fsessions%2F7a0f75b5-0ab1-483f-86a1-4f7fdb5a4ed5%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eyou%20definitely%20should%20watch%20the%20Ignite%20recording%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E(the%20IoT%20part%20start%20at%20minute%2022%3A59).%20Not%20only%20the%20architecture%20presented%20is%20super%20interesting%2C%20but%20also%20the%20guest%20presenting%20it%E2%80%8A%E2%80%94%E2%80%8ATara%20Walker%E2%80%8A%E2%80%94%E2%80%8Ais%20super%20entertaining%20and%20joyful%20to%20listen.%20Which%20is%20not%20something%20common%20in%20technical%20sessions.%20Definitely%20a%20bonus!%3C%2FP%3E%0A%3CP%20class%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22serverless%20streaming%20at%20scale.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F231183iC60D4A8E14AA56DD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22serverless%20streaming%20at%20scale.png%22%20alt%3D%22serverless%20streaming%20at%20scale.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20are%20interested%20in%20the%20details%2C%20beside%20the%20Ignite%20recording%2C%20take%20a%20look%20also%20at%20the%20related%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fyoutu.be%2F4SWNTqgjjyU%3Ft%3D415%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMechanics%20video%3C%2FA%3E%2C%20where%20things%20are%20discussed%20a%20bit%20more%20deeply.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20video%20reminded%20me%20that%20in%20my%20long%20%E2%80%9Cto-write%E2%80%9D%20blog%20post%20list%2C%20I%20have%20one%20exactly%20on%20this%20subject.%20How%20to%20use%20Azure%20SQL%20to%20create%20a%20amazing%20IoT%20solution.%20Well%2C%20not%20only%20IoT.%20More%20correctly%20how%20to%20implement%20a%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Farchitecture%2Fdata-guide%2Fbig-data%2F%23kappa-architecture%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EKappa%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eor%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Farchitecture%2Fdata-guide%2Fbig-data%2F%23lambda-architecture%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ELambda%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Earchitecture%20on%20Azure%20using%20Event%20Hubs%2C%20Stream%20Analytics%20and%20Azure%20SQL.%20It%E2%80%99s%20a%20very%20generic%20architecture%20that%20can%20be%20easily%20turned%20to%20IoT%20just%20by%20using%20IoT%20Hub%20instead%20of%20Event%20Hubs%20and%20it%20can%20be%20used%20as%20is%20if%20you%20need%2C%20instead%2C%20to%20implement%20an%20ingestion%20and%20processing%20architecture%20for%20the%20Gaming%20industry%2C%20for%20example.%20Goal%20is%20to%20create%20a%20solution%20that%20can%20ingest%20and%20process%20up%20to%2010K%20message%2Fsecs%2C%20which%20is%20close%20to%201%20Billion%20message%20per%20day%2C%20which%20is%20a%20value%20that%20will%20be%20more%20than%20enough%20for%20many%20use%20cases%20and%20scenario.%20And%20if%20someone%20needs%20more%2C%20you%20can%20just%20scale%20up%20the%20solution.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1212097177%22%20id%3D%22toc-hId--1212097177%22%3E%3CSPAN%20class%3D%22mpp-c-heading-3%22%3ELong%20Story%20Short%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3CBR%20%2F%3EThis%20article%20is%20quite%20long.%20So%2C%20if%20you%E2%80%99re%20in%20hurry%2C%20or%20you%20already%20know%20all%20the%20technical%20details%20on%20the%20aforementioned%20services%2C%20or%20you%20don%E2%80%99t%20really%20care%20too%20much%20about%20tech%20stuff%20right%20now%2C%20you%20can%20just%20go%20away%20with%20the%20following%20key%20points.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EServerless%20streaming%20at%20scale%20with%20Azure%20SQL%20work%20pretty%20well%2C%20thanks%20Azure%20SQL%20support%20to%20JSON%2C%20Bulk%20Load%20and%20Partitioning.%20As%20any%20%E2%80%9Cat%20scale%E2%80%9D%20scenarios%20it%20has%20some%20challenges%20but%20they%20can%20be%20mostly%20solved%20just%20by%20applying%20the%20correct%20configuration.%3C%2FLI%3E%0A%3CLI%3EThe%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure-Samples%2Fstreaming-at-scale%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Esample%20code%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ewill%20allow%20you%20to%20setup%20a%20streaming%20solution%20that%20can%20ingest%20almost%201%20billion%20of%20messages%20per%20day%20in%20less%20than%2015%20minutes.%20That%E2%80%99s%20why%20you%20should%20invest%20in%20the%20cloud%20and%20in%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FInfrastructure_as_Code%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Einfrastructure-as-code%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eright%20now.%20Kudos%20if%20you%E2%80%99re%20already%20doing%20that.%3C%2FLI%3E%0A%3CLI%3EGood%20coding%20and%20optimization%20skills%20are%20still%20key%20to%20create%20a%20nicely%20working%20solution%20without%20just%20throwing%20money%20at%20the%20problem.%3C%2FLI%3E%0A%3CLI%3EThe%20real%20challenge%20is%20to%20figure%20out%20how%20to%20create%20a%20balanced%20architecture.%20There%20are%20quite%20a%20few%20moving%20part%20in%20a%20streaming%20end-to-end%20solution%2C%20and%20all%20need%20to%20be%20carefully%20configured%20otherwise%20you%20may%20end%20with%20bottlenecks%20one%20one%20side%2C%20and%20a%20lot%20of%20unused%20power%20on%20the%20other.%20In%20both%20cases%20you%E2%80%99re%20losing%20money.%20Balance%20is%20the%20key.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22%22%3EIf%20you%E2%80%99re%20now%20ready%20for%20some%20tech%20stuff%2C%20let%E2%80%99s%20get%20started.%3C%2FP%3E%0A%3CP%20class%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sql%2Fserverless-streaming-at-scale-with-azure-sql%2Fba-p%2F1797119%22%20target%3D%22_self%22%3E%3CSTRONG%3ERead%20the%20full%20article%3C%2FSTRONG%3E%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1849317%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20SQL%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EServerless%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

This article was originally published by Davide Mauri to the Azure SQL blog.

 

Just before Ignite, a very interesting case study done with RXR has been released, where they showcased their IoT solution to bring safety in building during COVID times. It uses Azure SQL to store warm data, allowing it to be served and consumed to all downstream users, from analytical application to mobile clients, dashboards, API and business users. If you haven’t done yet, you definitely should watch the Ignite recording (the IoT part start at minute 22:59). Not only the architecture presented is super interesting, but also the guest presenting it — Tara Walker — is super entertaining and joyful to listen. Which is not something common in technical sessions. Definitely a bonus!

 

serverless streaming at scale.png

 

If you are interested in the details, beside the Ignite recording, take a look also at the related Mechanics video, where things are discussed a bit more deeply.

 

The video reminded me that in my long “to-write” blog post list, I have one exactly on this subject. How to use Azure SQL to create a amazing IoT solution. Well, not only IoT. More correctly how to implement a Kappa or Lambda architecture on Azure using Event Hubs, Stream Analytics and Azure SQL. It’s a very generic architecture that can be easily turned to IoT just by using IoT Hub instead of Event Hubs and it can be used as is if you need, instead, to implement an ingestion and processing architecture for the Gaming industry, for example. Goal is to create a solution that can ingest and process up to 10K message/secs, which is close to 1 Billion message per day, which is a value that will be more than enough for many use cases and scenario. And if someone needs more, you can just scale up the solution.

 

Long Story Short

 
This article is quite long. So, if you’re in hurry, or you already know all the technical details on the aforementioned services, or you don’t really care too much about tech stuff right now, you can just go away with the following key points.

 

  1. Serverless streaming at scale with Azure SQL work pretty well, thanks Azure SQL support to JSON, Bulk Load and Partitioning. As any “at scale” scenarios it has some challenges but they can be mostly solved just by applying the correct configuration.
  2. The sample code will allow you to setup a streaming solution that can ingest almost 1 billion of messages per day in less than 15 minutes. That’s why you should invest in the cloud and in infrastructure-as-code right now. Kudos if you’re already doing that.
  3. Good coding and optimization skills are still key to create a nicely working solution without just throwing money at the problem.
  4. The real challenge is to figure out how to create a balanced architecture. There are quite a few moving part in a streaming end-to-end solution, and all need to be carefully configured otherwise you may end with bottlenecks one one side, and a lot of unused power on the other. In both cases you’re losing money. Balance is the key.

 

If you’re now ready for some tech stuff, let’s get started.

 

Read the full article

0 Replies