Skip to main content

SQL Azure Elastic Pools - Review

ערב טוב
אז זהו הגיע זמן הפוסט על "SQL Azure Elastic Pools", ניסינו - התנסינו - למדנו ועכשיו יודעים על זה דבר או שניים.
ראשית זהו כלי בעל פוטנציאל מדהים שכאשר יעבוד חלק ויושלמו כל המרכיבים שלו זה שינוי מהותי.
שנית הוא בשל חלקית - אבל ככה היום עושות כל חברות הווב - מובייל - ענן... מוציאות משהו שלם לחצאין ונתנים לקהל להיות ה QA. אני מקבל את זה וזורם עם זה.

את הפוסט הזה אחלק ל 4 חלקים:
  1. הסבר קצר ולינקים להסברים על המוצר ועל חלקיו השונים.
  2. הסבר ודוגמאות על מה רואים בפורטל בחלקים השונים
  3. מהם ג'ובים? כיצד הם פועלים ומה האפשרויות מהם.
  4. מה הלאה...
נתחיל בהסבר קצר ובלינקים: המוצר הזה נועד להכניס לפול אחד מספר בסיס נתונים באותו שרת (נקווה שבעתיד הפול יוכל להכיל מספר שרתים), וכשהם בפול אחד ישנה דינמיות בהקצאת המשאבים בין בסיס הנתונים - אם עד היום כל בסיס נתונים היה יישות עצמאית בעלת יכולת עבודה וביצועים משלה ה DTU היה רק שלה, פה מכניסים לפול אחד מספר בסיסי נתונים וההגדרה של הסטורג' ושל ה DTU היא לא ברמת בסיס נתונים אלא ברמת הפול.
אם עד היום בסיס נתונים אחד מהדרגה S0 היה יכול להיות עד 250 GB, היום אם מכניסים אותו ועוד בסיס נתונים אחד לפול ואפשר במקסימום עד 1200 GB שזה שיםור עצום - אולם אם נכניס 15 בסיס נתונים תהיה לנו הרעה בהקצאת הסטורג'.
ואותו הדבר לביצועים - עם הזמן נלמד היכן האיזון.
זו ההגדרה של הפול באופן כללי מאד.
הלינקים הרלוונטים של איך יוצרים ומשתמשים מצא פה:

 
 

ומכאן לנקודה השניה מה רואים בפורטל ואיך זה בעצם עובד:

זו תמונה מעמוד הביית של הפורטל
אנו רואים פה קיצורי דרך לרכיבים הקריטיים של ה Pool. אני הולך משמאל לימין:
 
Resource Group (I know I need to explain abut that too) - of all my components in the pool
Sql Server V12 that hold few DB's that exists in the Pool
Elastic Pool itself
Resource Group  that holds the components  related to Jobs
 


אלו קיצורי הדרך והסימנים החשובים עכשיו נלחץ על ה - Pool עצמו ונראה מה רואים - אני פתחתי פה שני Blaeds - זוכרים את המושג הזה? אם היינו בשנות ה 80 היינו אומרים זה כמו ה windows - היום בעידן המובייל אלו מסכי הזזה....

מה רואים פה? ובכן ב etoro אני עובדים במקום מסויים באפליקציה על Shards DB's, הם חייבים להיות זהים מבחינת הסכמה ומאוזנים בביצועים. האפליקציה כותבת לכל Shard לפי טבלת מיפויים ובכך מאוזנת גם בקריאה וגם בכתיבה. פה אדגים מה רואים ב Elastic Pool על 4 בסיסי נתונים שיש ב Pool:
  1. גרף קטן שמראה תנודות של DTU וסטורג' ברמת ה Pool
  2. הגדרת ה Pool
  3. מה המקסימום DTU שיש ברמת בסיס הנתונים שנמצא ב Pool וכך אפשר לראות מי צרכן כבד או על חוסר איזון
  4. גרף קטן שמראה את מה שהטבלה מראה...
  5. קונפיגורציה של ה Pool: גרף קטן שמראה כמה אנו מנצלים מהגדרת ה storage של ה Pool וה DTU של ה Pool. וכפתורי לחיצה כאשר ההגדרה היא פה מה המקסימום שה Pool יוכל להגיע הן ברמת DTU והן ברמת Storage - רק היום הודיעו שהמינימום ירד ל 100 - דבר שמוריד הרבה עליות למי שרק בודק את המערכת.
  6. קונפיגורציה של ה Pool: גרף קטן שמראה כמה אנו מנצלים מהגדרת ה DTU של ה Pool ברמת בסיס נתונים אחד. וכפתורי לחיצה כאשר ניתן להגדיר מינימום ומקסימום לכל DB



ועכשיו אחרי שברור איך מקנפגים ומה רואים נעבור לעולם התוכן השני שזה הג'ובים: כשמו - לא - כן הוא זהו תהליך הרצה שניתן להריץ שוב ושוב של T-SQL אולם כרגע אי אפשר לקבוע לו לוח זמנים.

למה זה טוב?
זה מעולה הוא מריץ על כל בסיסי הנתונים שב Pool את אותו ה Query אם זה עידכון סטטיסטיקות - ואם זה  Deploy חד פעמי. במקום לעבור בסיס נתונים אחד אחד זה רץ על הכל..
גונב לאוזניי שממש בקרוב יהיה ניתן לעבוד בבסיס נתונים אחד עם כמה
external data source
שזה אומר שתוכל לעבוד מול בסיס נתונים אחרים או משהו כזה אבל זה לא כרגע...

בקיצור לוחצים על הלינק  של יצירת ג'וב


נוצרים מספר רכיבים ב Azure שמנהלים את הג'ובים - בעיקרון רכיבים אלו שקופים מבחינתינו מלבד התשלום החודשי - אבל באמת זהו סכום אפסי. יש פה אפליקציה, סטורג, ובסיס נתונים.
זהו ה
 Resource Group  that holds the components  related to Jobs
שהזכרתי למעלה.


 
 
מכיוון שאני אוהב בסיס נתונים וזהו בסיס הנתונים הרלוונטי שהוא כמו MSDB:
 
 
נחזור לג'ובים - אחרי שיצרנו את כל הרכיבים ניתן לייצר כמה ג'ובים שרוצים פשוט ממלאים יוזר וססמא שהם אחידים בכל בסיסי הנתונים.  הנה דוגמא לרשימה של ג'ובים כאשר לכל אחד ניתם להיכנס ולהריץ מחדש - כאמור עדיין אין אפשרות לקבוע לוז ריצה קבוע.
 
 
 
ניתן לראות לוגים של  הצלחות של הג'ובים ברמה כללית וברמה של כל DB לעצמו:
 
 
 
וניתן לראות לוגים של  כשלונות של הג'ובים ברמה כללית וברמה של כל DB לעצמו:
 
 
 
 
עד כאן.
 
לסיכום:
בצורה קלה ומהירה אפשר לייצר ישות חדשה בעולם ה SQL Azure DB, יישות שנקראת POOL והיא יישות ברמת תשלומים וברמת ניהול.
היא מתאימה לצרכים מסויימים כמו שירותים SAASים  או Shards - אבל אם נחשוב מחוץ לקופסא יש פה פוטנציאל למשהו הרבה יותר רחב.
 
נסו ותהנו
פיני


Comments

  1. Once you’ve decided on a method, merely choose it and follow the instructions. Of course, you’ll need to have some data prepared depending on the strategy you’re using. For instance, card payments would require your card number, expiration date, and CVC code. The 파라오카지노 excellent news is virtually all|that the majority} casino deposit strategies are instant, so find a way to|you presumably can} play immediately.

    ReplyDelete

Post a Comment

Popular posts from this blog

How to restore deleted Azure Synapse dedicated SQL pool

  Existing dedicated pool can be easily restored from Azure portal or PowerShell command, but for now deleted pool could be restored from PowerShell only! Example: # Connect to Azure with system-assigned managed identity $AzureContext = (Connect-AzAccount -Identity).context # set and store context $AzureContext = Set-AzContext -SubscriptionName $AzureContext.Subscription -DefaultProfile $AzureContext # $AzureContext = Set-AzContext -SubscriptionName $SubscriptionName -DefaultProfile $AzureContext $SubscriptionName="Databases" $ResourceGroupName="stg-rg-we" $ServerName="stg-synapse-we"   $DatabaseName="sql_we_2023_11_07_13_42" $NewDatabaseName="sql_dp_we_deleted" ######################################## $token = (Get-AzAccessToken -ResourceUrl https://database.windows.net).Token $SubscriptionId = "ce088f9e-1111111a3914b" $DedicatedPoolEndPoint = "stg-synapse-we.sql.azuresynapse.net" $DedicatedPoolName = $DatabaseNam...

The journey to the Lakehouse

A long time has passed since the last post, we have gone through a long and tedious journey to adapt what Azure offers us, to our needs. Our needs were simple, the Current Datawarehouse (SQL Server on VM inazure) served the BI. ML teams worked on GCP, we want to let both teams to work on Azure in a platform that will have the ability to scale and will not fail every 2 days. We checked: Snowflake on azure Synapse analytics GCP We decided to go for the full Azure product for the reasons: Migration time support costs Synapse as a platform contains many components, and the challenge was to find what fits  us as an organization and as a group. The knowledge of the people and their abilities influenced the plans. Here's what we planned and what we did: We start to put everything in the Data Lake in parquet or delta format, build on top of Azure ADLS gen 2. We had to move some data to T-SQL compatible platform, so this involves setting up a dedicated Synapse pool , which is a fully man...

From DBA to Data Engineer in Azure

I recently moved a role From being a DBA Manager, Who is responsible for the operational databases. I moved to manage the data engineering group. So what exactly is the difference between the two functions? DBA - Production Databases: SQL\ NoSQL- 24*7, powerful server on premise or on the cloud, managed or semi managed, security tasks, high performance is a target, multiregional, HA as top priority. Developers are using Microservices - so we have many applications many services and many many Databases. Many kinds of DB's like Cloud IAAS and PAAS. Secure and audit the data is must. The Clusters must have Uptime as long as we can achive. Data Modeling - is so important too. Challenges and Problems in the data bases systems Lots of DB’s Lots of creators / no standards Lots of Consumers (Query, tools, SLA) Raw data Lots of data resources Data silos In Data Engineering we have other challenges for example we have Data lake and Data Warehouses : Batch process. Stream Process. many data ...