THEY are two of the biggest names in technology and each is grappling with a huge and highly embarrassing debacle. On April 26th Amazon's finance chief, Thomas Szkutak, said the firm was still trying to get to the bottom of a glitch that caused numerous websites it hosts for other businesses to crash or run painfully slowly during the previous week. The same day, Sony of Japan revealed that names, addresses, passwords and possibly credit-card details of 77m accounts were stolen when hackers gained access to the network it runs in 60 countries for its PlayStation online-gaming system, as well as for Qriocity, a service offering music, films and television shows.

The two cases are different, but each has, in its own way, revived worries about the safety of storing and processing data over the internet—worries that have largely faded since the web's early days, as countless individuals and companies have come to find that the benefits of doing things online greatly outweigh the risks. The two crises have also raised questions about the speed and quality of information provided by tech companies when confronted with systems failures.

Details of what happened at Amazon Web Services, which offers computing services and data storage over the internet “cloud”, were still emerging as we went to press. But it seems that a serious problem in a data centre in northern Virginia triggered an outage that affected some of the firms using that centre's infrastructure, including Foursquare, a social-media company, and a number of other prominent start-ups. Some data seem to have been lost permanently. Amazon irritated its corporate customers with the vagueness of its early updates. Keith Smith, the boss of BigDoor, a gaming firm, complained in a blog post that these seemed to have been written by lawyers and accountants “rather than by a tech guy trying to help another tech guy.”

That is a black mark against a company that prides itself on being among the world's most customer-centred. But none of this means the shift to cloud computing is about to go into reverse. Indeed, Forrester, a research outfit, reckons that the global market for cloud services could grow from $41 billion last year to $241 billion by 2020. One reason for this is that the savings that can be won by shifting computing to the cloud remain compelling; another is that Amazon-style snafus have been rare.

Yet another is that managing one's own network is hardly a guarantee of reliability. Ask Sony, whose online-gaming system, albeit delivered through the cloud, is hosted on its own servers. Services were suspended on April 20th after an intrusion was detected, but Sony then took almost a week to admit the risks to users' personal data. The company insisted it had taken this long for it to realise the seriousness of the threat. But this claim was met with scepticism; and Sony's failure to encrypt all of its customers' data may bring it lawsuits and regulatory penalties.

Sony's slowness at warning customers is particularly damaging because it comes just as new versions of high-profile games such as Mortal Kombat and Portal 2 are being released for both the PlayStation and its rival, Microsoft's Xbox 360. This was “really bad timing”, says David Abrams, the chief executive of Cheap Ass Gamer, a gaming-information provider in Tokyo.

Sony's outage also interrupted third-party services delivered over its network, such as some of Netflix's online film rentals. Netflix also uses the Amazon data centre that went on the blink, but avoided any problems as a result of this. The secret of its relative resilience is what the company calls its “Rambo Architecture”. Among other things, this means designing different parts of its system—say, the bit that recommends videos and the bit that lets users search for them—so they function independently of each other, making it less likely all will keel over at once. The firm also uses software it designed itself called “Chaos Monkey”, which randomly simulates failures in its cloud-based systems to see how robust they are.

Some firms bring in specialist advisers to plan, test and manage their technology set-ups in the cloud. Michael Kirven, the boss of Bluewolf, one such advisory firm, says that because Amazon and other providers have made it so easy for companies to shift their services to the cloud, some customers have been lulled into thinking they don't need the same amount of backup protection as they would elsewhere. But as this week's events amply demonstrate, although the benefits of doing things online still greatly outweigh the risks, it often pays to be paranoid.