Ask Slashdot: Low Cost Way To Maximize SQL Server Uptime? 284
jdray writes "My wife and I own a mid-sized restaurant with a couple of Point of Sale (POS) terminals. The software, which runs on Windows and .NET, uses SQL Server on the back end. With an upgrade to the next major release of the software imminent, I'm considering upgrading the infrastructure it runs on to better ensure uptime (we're open seven days a week). We can't afford several thousand dollars' worth of server infrastructure (two cluster nodes and some shared storage, or some such), so I thought I'd ask Slashdot for some suggestions on enabling maximum uptime. I considered a single server node running VMWare with a limp-mode failover to a VMWare instance on a desktop, but I'm not sure how to set up a monitoring infrastructure to automate that, and manual failover isn't much of an option with non-tech staff. What suggestions do you have?"
What's your actual problem? (Score:5, Insightful)
Why don't you have good uptime to begin with? I've SQL Server 2005 on a single unimpressive physical server with months of uptime. Is your restaurant open 24 hours? Is your current server flaking out? Concerns about uptime itself might be misplaced. What isn't made clear in the OP is why you think you need better uptime.
Re:What's your actual problem? (Score:5, Informative)
In addition to what the parent post said, recent editions of MS SQL Server have really nice mirroring capabilities in built in to the standard edition and you don't have to purchase a license for the "mirror" server. Even better, if you have enterprise edition, your .NET app can automatically fail-over to the mirror server. No shared disks, no windows clustering. It's pretty darn simple.
Re:What's your actual problem? (Score:5, Informative)
if you have enterprise edition, your .NET app can automatically fail-over to the mirror server.
Actually, the Standard Edition will do this you just need to set up the connection strings to point to both servers.
The Enterprise Edition will do asynchronous mirroring, but it's not worth paying extra for.
Re:What's your actual problem? (Score:4, Interesting)
Re:What's your actual problem? (Score:4, Insightful)
I guess I'm saying I would rather spend money/effort on cheap/free virtualization(HyperV3 is coming out this fall-ish) to allow a quick recovery boot from another machine, than spending money on redundant hardware and real-time failover.
Probably a server and a desktop. The desktop could load the image and start his SQL image just fine. Not optimal, but would work while waiting for his server to get fixed.
Re: (Score:2)
It sounds like they need to upgrade the software because of a license, contract, or support reason. Since there is a major change, it could make things more stable or less stable. The posting wants to make sure he gets the best dollar out of the upcoming refresh.
Re: (Score:2)
The importance of this question is not to be underestimated. Anything that adds availability also adds complexity, and if not done correctly will actually worsen your availability. More than once I've seen new "high availability" setups that were less reliable than the original "non-high availability" setup.
If you want to protect against hardware failure, get a server with redundant power supplies and hard drives (can be had for under $2k), and monitor them. Now, redundant power supplies are a no-brainer, b
Re: (Score:2)
SQL 2012 (Score:5, Informative)
Re: (Score:2)
Re: (Score:2)
don't pay extra for asynchronous mirroring. it's only useful for distant DR scenarios where c is a factor. if you're trying to do cheap fail-over, use synhcronous mirroring on standard edition with a decent network connection (cross-over 1GB works great). it's cheaper and safer.
Advice. (Score:2)
Re: (Score:2)
i'm guessing he wants failover so he doesn't have to be rebuilding machines and restoring backups just to get his POS systems up and running 10 minutes before the lunchtime rush.
Easy enough (Score:5, Insightful)
Get a decent server, maybe an HP. Dual CPUs, Dual HDDs, Dual Power supplies. Get a UPS.
Install Windows, SQL, and UPS controlling software. Install AV, but be certain to exclude AV scanning the SQL directory and SQL DBs and logs. You don't want AV killing your SQL server by accident. You might want to consider putting a firewall on the box and blocking all non-SQL traffic.
Patch as needed.
Install nothing else. No mine-sweeper, no restaurant food ordering software, no adobe. Nothing will kill a server faster than turning it into a desktop. Don't try to do anything on it. Just let it be a server running SQL and you'll be fine. Don't plug USB drives into it.
You should be able to back up the SQL db every so often stopping SQL and then starting it. Try to do this around the monthly patch cycle. Don't patch immediately upon one becoming available, but rather wait a week. This will give Microsoft time to correct any patch issues they have. You'll be much more vulnerable to patch issues than you will from viruses if you follow the "don't turn it into a desktop" suggestion.
well the restaurant food ordering software or even (Score:3)
restaurant food ordering software or even time clock software may need a backend sever for there own data bases or some stuff like the food system may tie into the main data base.
Re: (Score:3)
Uhh, what.... stop the SQL server to back it up.... have you never used SQL before?
SQL can happily back itself up while running. In fact any decent backup program can backup the whole system while SQL is running and still get a clean DB copy
Re: (Score:3)
Re: (Score:2)
Doing backups while online (still running) work just fine, and will run as fast as your little hard disk can write.
Re: (Score:2)
Re: (Score:2)
Amazon RDL (Score:2)
Re: (Score:2)
It isn't difficult in most places to get a router capable of switching between two different internet connections, failing over from the primary to the secondary in a matter of a minute or so. Use cable & dsl, or cable & dial-up, or dsl & dish, or even cable & 4G.
Re: (Score:2)
Easy solutions, what is the question (Score:2)
MySQL cluster (Score:4, Informative)
You can run MySQL Cluster [mysql.com] on two machines. It's somewhat complex to set up. And your POS terminals have to be able to connect to either server. But it's available.
If you're getting more than one crash a year, you have hardware problems. Commodity hardware may be unsuitable for a restaurant environment. You may need an industrial-grade PC, with a broad operating temperature range and resistance to dirt, dust, grease, and water. There are PCs and enclosures for restaurants, and the fast-food industry uses them extensively. Every McDonalds, Burger King, and KFC outlet uses industrial-quality POS systems.
You wouldn't use a home-quality stove or a home-quality coffee maker in a restaurant. It wouldn't hold up. The same goes for a computer.
Re: (Score:2)
Re: (Score:2)
In all fairness, all decent .NET programmers can easily switch to using MySQL, Oracle, DB2, or Postgress. They all have .NET connectors that pretty much make switching between them fairly trivial. Even more trivial if you know this might be required beforehand.
Ask the POS vendor (Score:2, Insightful)
Stop. Whoever makes the POS software is the expert that you want to consult. Call up their support and ask them what they recommend.
Moving it elsewhere may not help (Score:2)
I would not immediately assume that moving it somewhere else will increase uptime; it puts uptime requirements on the Internet link(s) instead of on the server or software setup. Unless the present setup is quite unreliable or he has a surprisingly good link, I think that would likely be a worse problem.
Now, the idea that you can't afford multiple server nodes: Servers can be very, very cheap. For my home server I use an Acer Revo 3600 I paid 200 euro for; the closest available today seems to be http://ww [amazon.com]
If you can't measure it, you can't manage it (Score:5, Interesting)
If you can't measure it, you can't manage it. You haven't taken the first and most essential step in analyzing your problem: measuring it. Is your problem caused by network failure? By power? By software failure? Hardware? If hardware, by server hardware, disks, or something else?
If software, by OS, database, or application software? All of these have different solutions. Going to the cloud won't solve a network failure, it will make things worse. Going to the cloud may improve persistent hardware failures. but the MTBF of most decent hardware is pretty good, so are you sure you have clean power and a good (cool, clean) environment?
If your software or system is crashing, then that's its own problem.
Re: (Score:2)
So all of us crazies are hopeless and should throw in the towel?
Re: (Score:2)
If you can't measure it, you can't manage it.
Perhaps appropriate in this context, but misquoted [curiouscat.com].
There are a couple options (Score:2)
The product description for VMware HA is exactly what you are talking about, but you do need a license to use it. I think you can get a barebones license for about $2k, which is expensive for a small shop, but it does buy you automated failover.
There are plenty of desktop class machines out there that are compatible with VMware, so assuming your hardware requirements aren't too hi
really (Score:3)
Have you really ever had problems with SQL Server crashing before? What version? What kinds of workloads? Did you tell Microsoft?
Don't bother with clustering, use Mirroring [microsoft.com] or AlwaysOn Groups [microsoft.com] instead.
Honestly (Score:2)
If you are not willing to put the money into the infrastructure, you are not going to get the infrastructure that you would have if you had put the money into it. There is no magic secret sauce that IT people have that turns low budget implementations that operate the same as well thought out, planned, paid for and implemented infrastructure. In other words, baring any greatness or incompetence of IT skills, you get what you pay for.
Plus, when you look at these infrastructure problems, don't look at it as h
Re: (Score:2)
That's true, but there are several shades of "not putting the money into infrastructure". For example, one can put PCs on a HA setup (a redundant array of inexpensive computers), that will increase the uptime when compared to a single PC, and if done well can even be more reliable that a server. Or, use RAID, hardware or even software RAID if the p
hot-swap RAID-5 (Score:2)
Re: (Score:2)
Don't you mean hot-swap RAID 1?
Raid 5 puts pieces across multiple drives along with parity bits, no single drive has a complete copy.
Raid 1 is mirroring where two drives have identical information. Each drive has its own copy.
Re: (Score:3)
I recommended RAID 5 because it can tolerate two drive failures if you give it all five, and I have seen two drives fail at once. It also performs better for SQL, not that it really matters in this case.
Uh, no, no it can't, not no way no how. And it doesn't necessarily perform better for SQL either. A 2 disk RAID 1 can handle one of the two disks dying. A RAID 5 of ANY size can handle one of the n disks dying. If you're thinking of RAID 6 (HP called it RAID ADG for ages) then yes that can handle 2 disk failures. So can RAID 10 for a subset of cases.
And in either case I doubt POS for a restaurant is taxing the server - I recall Dominos stores in Australia running a simple SATA mirror set on their in-store s
why not SQL on the POS? (Score:3)
I've seen pretty nifty windows based POS systems that had the SQL server start on each POS, look for a master and if there was one already, try and be slave. If that failed, it would just fail and try to become slave every few minutes. Apart from that, the POS software would just connect to the master-of-that-moment. Once the master went down, the slave would promote itself and the fist POS that tried then became the slave. All POS terminals that were up would constantly replicate database files/dumps/backups whatever so they would never be too far behind the master. I don't know how this mechanism worked exactly, but it was pretty resilient against little restaurant accidents and power glitches.
I Wouldn't want to directly advise to go cloud. If your uplink dies, so does your POS system. You could put backups in the cloud to prevent theft or arson destroying your accounting and books, but I'd not trust a single uplink high latency service with your primary business myself. Even if you get business quality lines with a proper SLA, you still can be down for half a day easily and pay hundreds of dollars per month for just the single uplink. Getting two independent uplinks with this kind of SLA will be so prohibitively expensive that you could easily afford to do your own cluster for that kind of money.
Re: (Score:2)
What if his network goes down? He needs to spend a few hours figuring out a pencil/paper/calculator process and have that ready to go as a backup.
Re: (Score:2)
You realize there is nothing keeping that nifty windows based POS from using the cloud and if down, switching to a local copy of SQL Server to use as a cache until the cloud comes back up, right? Or always using the local, and having it replicate changes to the cloud as possible.
Actually a big point is missing here (Score:2)
Firstly, you need to make sure there is a paper process which people can run by if the kit fails. Business continuity doesn't always require a massive DR strategy especially in your market area. If the kit does go pop, your staff need to be able to work instantly - paper is the best and did for years before computers came along.
However from a technical POV, speaking from 15 years experience running SQL Server instances, there's no cheap solution that works reliably. Hot standby (HA mirror) is the best app
Recommendation from the source (Score:5, Informative)
SQL Server experience (Score:3)
I recently inherited an application built on .NET, we're a Linux organisation. The devs had typically built it on SQL Server Express with not a care in the world, but it was a core business app.
We bought a single license of SQL Server standard, and put it in Master Slave replication mode. Not having touched Windows for years (as a server) it was a bit of faff to get an Active Directory setup going, but it actually works okay. You don't need to license the failover server for SQL Server.
If there's a failure, it's about 10 minutes on notification to flip the servers over and a bit of manual intervention. You can cut this down by buying a third box to use as an observer, but that seems to be another SPF.
Re: (Score:2)
10 minutes? manual intervention? you're doing it wrong.
it takes about 5 seconds for our mirror to fail over and it requires NO manual intervention. i can pull the plug (literally) and after a short pause the application keeps running as if nothing had happened. the only change required to the application was specifying the failover partner in the connection string.
Re:SQL Server experience (Score:4, Insightful)
there's no need to upgrade. you already have the SQL license (as long as it's at least v2005). you don't need replication, you don't need a cluster, you don't need shared storage. you just need two boxes, one license, mirroring setup, a backup strategy and a connection string tweak. everything else you can sell...
Advice is cheap (Score:2)
First of all whatever you do don't listen to those saying "to the cloud". When your ISP/Internet is not working it means your POS is not working which means your business is fucked -- at the total mercy of a working Internet connection. Most POS software is not optimized to minimize round trips either so expect pushing database to "the cloud" to be much slower.
The lowest cost easy to configure and manage approach is to setup a periodic backup task to backup entire database every few minutes and copy to t
Things have a cost (Score:2)
Frankly, if you don't value your uptime worth x why bother? There is no magical pill and if your current infrastructure fails to handle existing load there's nothing you can prudently do without shelling out additional money (or time - which IS money).
If it all seems to work all right, just make sure you back-up and monitor your existing hardware for possible failures.
Synology/QNAP + Database Mirroring FTW (Score:2)
I've also worked for numerous large restaurant chains in a consulting capacity and understand the unique needs here.
My suggestion within your parameters is to have two SQL instances going, and this can be on commodity hardware like desktop, and use transaction log shipping and DNS-based failover. You will have to script a utility
Re: (Score:2)
I believe you don't need Active Directory to do synchronous mirroring with failover. you can do it with certificates. I'm not sure why you need the shared storage for mirroring, though. the whole point of mirroring (as opposed to clustering) is to remove the need for shared storage.
Why are you worrying about the POS system? (Score:4, Insightful)
Restaurants POS systems aren't exactly cutting-edge technology. There's gotta be a kazillion commercial systems out there and lots of pros to install and manage them who have set up and maintained hundreds of these systems. There's probably even some sort of restaurant owner's organization that can recommend systems and consultants. Why are you spending time on a tech site wondering about how to roll your own POS infrastructure when it provides no competitive advantage to your business and any screwups could cost big money? Spend your time worrying and working on stuff that will actually help your business compete with all of the other restaurants out there. Not that I know much about the restaurant biz, but I'm going to guess that getting and keeping good cooking staff, waitstaff, etc, getting quality supplies at a good price, and marketing the place and other restaurant-y things belong much higher on the owner's worry list than what hardware and software the POS systems are using.
Here's what you want to do ... (Score:5, Insightful)
.
Short and sweet - you want database mirroring with automatic fallover. You can set up a second SQL server on a separate machine (cost less than $500 for the machine) to be the mirror and if your primary machine fails then you are still golden. Here is an article that tells gives you an idea as to how to do this in MS SQL '08 :
http://www.databasejournal.com/features/mssql/article.php/3828341/Database-Mirroring-in-SQL-Server-2008.htm
Yes, you should hire a **competent** DB consultant to do this for you. Yes it will cost you another $800 - $1000 do have a **competent** consultant do this for you (figure 8- 12 hours work at 80 bucks an hour) - you will lose far more than that the very first time your database fails and/or you attempt to do it yourself and blow away your database because you made a mistake (you do have backups , of course.... right ??? ).
You can try to do it yourself but I do not recommend it as it's risky.
I've been doing DB work for 25 years - feel free to send me a Slashdot message should you desire to use my services.
As a POS expert... (Score:2)
If your SQL server is currently having downtime, WHY is it having downtime?
Is it hardware? Buy a newer system, nothing very fancy is needed, preferably a dual-raid system, for OS and data, but one raid to rule them all can work too.
Is it software? This is what
Mirror your hardware (Score:2)
Not gonna happen (Score:3)
Re: (Score:2)
Re: (Score:2)
I assume a Point of Sale system is mostly a closed system and network right ? Why would it break ?
Re: (Score:2)
Re: (Score:3, Funny)
Roger Moore's law.
What does James Bond have to do with this?
Re: (Score:2)
Re: (Score:2)
It can also break on the upgrade... so is not an easy answer.
Re:If it a'int broke... (Score:5, Funny)
Re: (Score:3)
WTF? Software isn't subject to physical wear like an engine. Do you think friction will eventually turn a 1 into a 0 somewhere in the code?
No, but if there's a race condition that occurs once in a blue moon, the cumulative probability of trouble can increase monotonically with time.
Re: (Score:3)
Why not? It's not friction that'll turn a 1 in to a 0, but simple entropy or cosmic rays (seriously). ECC RAM is designed specifically to guard against that kind of problem.
Friction can kill anything that moves -- fans and hard-disks. If a fan dies, either in the PSU, the case or on the CPU, you could end up with a server that crashes and has all kinds of problems. That's why real servers beep incessantly to let you know if a fan is dying.
And software can crash over time. I write software for a living, and
Re: (Score:2)
No, but if he requires ongoing support, that may well be subject to running a particular version.
Re:If it a'int broke... (Score:5, Informative)
Agreed but. How old is the hardware?
If it's over 5 years then you should consider monitoring the following components that are exposed to physical degradation:
- Hard drive
- Cooling fans
- Power Supply
- Network equipment if your electrical current is flaky.
Your uptime might be more impacted by the level of maintenance you do on your equipment. I'm afraid to ask but if in any way your equipment is close to kitchen smoke then you could experience nasty greasy deposits in fans and air vents.
Your next step is have a disaster recovery at the ready with your most recent VM image backup.
Re: (Score:2)
Oh and... check free disk space!
Re: (Score:2)
Re: (Score:2)
pay per month access to redundant systems
pay through the teeth for redundant fast internet connections and a router that can intelligently detect outage and fail over.
Re: (Score:2)
Re: (Score:3)
Re: (Score:2)
Re:Not to get buzzwordy, but Azure...the Cloud! (Score:5, Insightful)
Azure had multiple 24 hour outages.
It's cloud so that seems like a great idea !
Re:Not to get buzzwordy, but Azure...the Cloud! (Score:5, Funny)
Re: (Score:3)
Re:Not to get buzzwordy, but Azure...the Cloud! (Score:5, Insightful)
Sounds like an awesome idea - that way, you are TOTALLY FSCKED when your internet connection goes down. One thing if your online ordering for a business goes down - just take orders by phone. When it completed hoses your order taking system (offline and online), then your screwed.
Re: (Score:2)
Re: (Score:2)
There's also dialup for CC authorization and the old paper swipe machines that they can use for backups.
"The cloud" is most definitely not the answer if SQL uptime is the goal.
Re: (Score:2)
Except that many card schemes are refusing to allow paper charge forms now. In my country, everything's moved to "Offline Authorisation" in case of network failure - the system sees an outage and just approves the transaction and saves it for submission later.
Re: (Score:2)
Re:Not to get buzzwordy, but Azure...the Cloud! (Score:5, Insightful)
sounds like a fucking stupid idea, the entire operation is local and can run easily on computers which can be bought 200 dollars a pop. two of them, set up mirroring and go - even azures pricing sounds stupid compared to that.
the cloud is a stupid idea because a) azure can go down and b) their link to azure can go down. in both cases they're screwed.
what they could need/want would be a totally separate backup, if they're american then maybe square - if they're european wtf does a restaurant need a complex POS system for when you can get self contained payment terminals that take chip cards and connect wirelessly(or cache those which don't need instant verfication) on the pennies? (ok, those don't take care of your actual orders and such, if the restaurant system is really fancy)
Re: (Score:2)
Until AWS collapses, like it's also done several times before. At which point you're screwed. Forget Amazon, they are years behind using your own damn hardware.
Re:You are asking the wrong question (Score:5, Insightful)
Man, why is every askSlashdot these days full of people who don't think anyone can do their own backend infrastructure (or anything else, for that matter) unless that's their only job? Look, this guy has obviously been running his POS system for some time, already. Just because he isn't a whiz at SQL Server failover doesn't mean he should just throw up his hands and hire a contractor.
Have you completely given up on learning new things and exploring your options, or do you just advocate that other people do so?
Re: (Score:2)
so +1
Re: (Score:3)
When running a business, you really have to draw lines between what you can/can't do, and what you want to/don't want to do. You also have to factor in what the cost will be if you mess it up while trying to learn.
If I were currently running a business, I would hire an accountant do handle my taxes. It's not that I couldn't figure it out, but it's something I don't care to figure out. I'd rather focus on what my business is. But then again, if I did it myself and screw it up, who badly could it hurt my b
Re:You are asking the wrong question (Score:5, Insightful)
Everybody thinks they know what restaurants do.
This is why so many otherwise smart people get into the restaurant business and then fail.
Forget the word restaurant.
Instead, think highly competitive, low volume, high mix, low margin, short lead-time manufacturing.
Think highly perishable inventory.
Accurate inventory, accurate predictions of future demand, and data driven product design make all the difference between success and failure.
Data collection and analysis is what really successful restaurants do. Or did you really think it was like Top Chef?
Re: (Score:2)
And stay off his lawn, dammit!!
Re:Obvious solution (Score:5, Funny)
MySQL is not web scale. He should use MondoDB. That is web scale.
Re: (Score:2)
Comment removed (Score:5, Informative)
Re: (Score:2, Insightful)
Agreed.
I'm highly familiar with the POS system in US McDonald's restaurants. I'm sure they have more volume than you do.
If the server goes down, the registers can limp along on their own but it isn't pretty, and there's no high availability anything going on. Depending on what fails, the KVS might or might not work.
(For the uninitiated, KVS = Kitchen Video System. Those are the screens that tell the kitchen what food to make. Most busy restaurants - not just fast food - have them these days.)
What you need i
Re: (Score:2)
Please mod- this was my initial thought
Re: (Score:2)
Re: (Score:3)
not that generic.
i did a google search for 'SQL Server' [google.com] and found 1 link on the first 6 pages that didn't use 'SQL Server' to refer to the Microsoft product. and that 1 link was mysql.com which didn't mention 'SQL Server' on the page at all (only 'MySql Server').
the only other major DBMS to have 'SQL Server' in its name was Sybase SQL Server the ancestor of Microsoft's product.
Re: (Score:2)
If I had to guess, the OP doesn't want to go to the cloud because, hell, why should he?
The current state of affairs is that the data center owns the data ("possession is 9/10ths of the law"). Latency and bandwidth is also an issue. Everything is currently on-site. Trading latency and bandwidth for uptime may not be necessary nor desirable.
Additionally, when it's hosted by someone else, you live under their rules. Rules that are subject to change and not necessarily to your liking. Having the hardware/s
Re: (Score:2)
What happens if the internet goes down? Not only do credit cards not process, but everything -- including ordering, grinds to a halt. Not a good system if you ask me. Not everyone needs the cloud, especially small businesses with less than reliable internet.
Re: (Score:2)
Re: (Score:2)
So what if the corruption/strange bug does occur on supported versions? Your data is just as lost and all you can hope for is somebody on the line that can walk you through a re-install. Licenses/support agreements NEVER EVER covers data corruption and recovery even if you're paying Sun/Oracle/MS 250k/year for support. Same goes in the cloud, I don't know any provider guaranteeing your data 100%.
Re: (Score:2)
Repeat after me:
= RAID is not HA.
= RAID is not backup.
= RAID does not protect you against anything.
What does RAID do:
= If set up correctly, it will give an individual computer a little bit more availability
-OR-
= If set up correctly, it will give you better performance
-OR-
= If set up correctly, it will give you a faster recovery time from catastrophic failure
You won't have five nines because besides hard drives, you also have software (since he's running MS, that means at least a monthly reboot) and you also