This blogpost is an addendum to my previous blog “SQL 2016 – 5 (Real) reasons to upgrade, part 2” where I explain about StretchDB. We know that StretchDB is an awesome feature, but what will it cost and how does it compare with your local SAN storage?
StretchDB
For StretchDB, the answer looks simple because Microsoft provides us with clear pricing tables.
Let us focus on locally redundant storage, as this is the competing area of existing SAN solutions. For our calculations we’ll use the most expensive threshold, so let’s say we’ll only stretch 1TB into Azure, this being the most expensive ratio.
Ok, taking all these variables into account, storing 1TB in StretchDB will cost you €60.5 per month. Of course this is without taking the download costs into account. As this is archived data we’ll presume that this dataset will not be queried regularly. For arguments sake let’s say all the queries that run on this set will only download a volume of 200GB every month (20% following the 80/20 rule).The download ratio for this kind of volume is again the most expensive option costing you €0.0734/GB or €15 per month (source: https://azure.microsoft.com/en-us/pricing/details/data-transfers/ ). This means that storing a 1TB stretched table, sporadically querying it for 200GB a month will set you back for €75.5 every month.
SAN storage
Prices for SAN storage are a bit more difficult to calculate as this is an appliance and both up-front costs and service contracts will largely differ depending on the contract negotiated with your SAN vendor. For arguments sake I’ll work with the list prices as found on the internet, giving me an estimated price of ±€9,000 for an entry level SAN with 8TB of usable RAID 5 storage. One SAN appliance has an estimated life cycle of 5 years, so when including 5 years of support this will go to an approximate price of €16,500. This means that storing your (in this case partitioned) table in an archive filegroup will cost you: €16,500 / 5 years / 12 months / 8TB = ± €35 per month for one TB non-duplicated storage.
A simple conclusion could be that SAN storage is effectively cheaper, but this is only the case if you don’t duplicate this storage and don’t take any backups at all. This either means that you’re not having any High Availability features on this data, or that the database is not running in an AlwaysOn configuration. Let me go into detail a bit more.
Backup
As the dataset of our example is part of the database, we didn’t take into account any database backups. There is a major difference with StretchDB, however, as a backup of a Stretch-enabled database is a shallow backup that does not include data migrated to the remote server. On the SAN you would be able to take filegroup backups, but I rarely see this in the field unless the databases get really large. In this calculation we’re only archiving 1TB, so I don’t think the backup strategy would include filegroup backups or any differentials.
Let’s say the backup compression is used and the filegroup has a data backup ratio of 10%. In this situation it is rather common to store at least 3 full backups of your database. Transaction log backups don’t matter as this data will rarely change. This adds a total of 30% to the equation of the SAN storage. There is another possible scenario where the archive is at least three times bigger then the hot-data zone still on the server and this will give the same backup overhead.
Redundancy
Also the Azure Table storage has at least 3 copies of your data, most SAN configurations are duplicating their storage for redundancy. To be completely honest in my comparison I should thus triple the SAN’s price, but, in my experience, data is only duplicated so I’ll only duplicate the SAN’s cost. A reasonable question would be if you have to duplicate your backups as well. But in this equation I’ll presume that backups are taken across datacenters and are not duplicated. This actually doubles the initial price of the SAN storage.
Recalculating
These recalculations did not change anything on the StretchDB side, so the estimated price remains €75.5 per month. For the SAN Storage there are some important changes, the initial cost of €35 changes to: €35*(200% + 30%) = €79 per month.
As you can see in this example, storing your archived dataset via StretchDB, pricewise, lies very closely to SAN storage, giving us very interesting data to work with.
Scenario Criteria
Then StretchDB will be cheaper than on premise SAN storage, even without calculating the operational cost (energy/maintenance/work hours) of your SAN. We didn’t take into account additional cost for SAN growth (additional storage or boxes), as this is difficult to calculate. Also, we calculated the price of the SAN on a per TB level, presuming that it is 100% in use without having to extend it.
Management Summary
If you choose your stretch function wisely, and make sure that the archived zone is queried occasional and only when needed (for example by making minor adjustments to the DDL), StretchDB will rarely become more expensive than a comparable solution using on premise SAN storage. Especially because of the scenario criteria being rather favorable for the SAN solution.
Cookie | Duration | Description |
---|---|---|
ARRAffinity | session | ARRAffinity cookie is set by Azure app service, and allows the service to choose the right instance established by a user to deliver subsequent requests made by that user. |
ARRAffinitySameSite | session | This cookie is set by Windows Azure cloud, and is used for load balancing to make sure the visitor page requests are routed to the same server in any browsing session. |
cookielawinfo-checkbox-advertisement | 1 year | Set by the GDPR Cookie Consent plugin, this cookie records the user consent for the cookies in the "Advertisement" category. |
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
CookieLawInfoConsent | 1 year | CookieYes sets this cookie to record the default button state of the corresponding category and the status of CCPA. It works only in coordination with the primary cookie. |
elementor | never | The website's WordPress theme uses this cookie. It allows the website owner to implement or change the website's content in real-time. |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
Cookie | Duration | Description |
---|---|---|
__cf_bm | 30 minutes | Cloudflare set the cookie to support Cloudflare Bot Management. |
pll_language | 1 year | Polylang sets this cookie to remember the language the user selects when returning to the website and get the language information when unavailable in another way. |
Cookie | Duration | Description |
---|---|---|
_ga | 1 year 1 month 4 days | Google Analytics sets this cookie to calculate visitor, session and campaign data and track site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognise unique visitors. |
_ga_* | 1 year 1 month 4 days | Google Analytics sets this cookie to store and count page views. |
_gat_gtag_UA_* | 1 minute | Google Analytics sets this cookie to store a unique user ID. |
_gid | 1 day | Google Analytics sets this cookie to store information on how visitors use a website while also creating an analytics report of the website's performance. Some of the collected data includes the number of visitors, their source, and the pages they visit anonymously. |
ai_session | 30 minutes | This is a unique anonymous session identifier cookie set by Microsoft Application Insights software to gather statistical usage and telemetry data for apps built on the Azure cloud platform. |
CONSENT | 2 years | YouTube sets this cookie via embedded YouTube videos and registers anonymous statistical data. |
vuid | 1 year 1 month 4 days | Vimeo installs this cookie to collect tracking information by setting a unique ID to embed videos on the website. |
Cookie | Duration | Description |
---|---|---|
ai_user | 1 year | Microsoft Azure sets this cookie as a unique user identifier cookie, enabling counting of the number of users accessing the application over time. |
VISITOR_INFO1_LIVE | 5 months 27 days | YouTube sets this cookie to measure bandwidth, determining whether the user gets the new or old player interface. |
YSC | session | Youtube sets this cookie to track the views of embedded videos on Youtube pages. |
yt-remote-connected-devices | never | YouTube sets this cookie to store the user's video preferences using embedded YouTube videos. |
yt-remote-device-id | never | YouTube sets this cookie to store the user's video preferences using embedded YouTube videos. |
yt.innertube::nextId | never | YouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen. |
yt.innertube::requests | never | YouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen. |
Cookie | Duration | Description |
---|---|---|
WFESessionId | session | No description available. |