Large-scale deployments on Google Compute Engine may consist of hundreds of dynamic and transient components such as instances, disks, networks, and firewall rules. To manage and debug these resources, we often have to look back in time to find answers to questions such as ...
Large-scale deployments on Google Compute Engine may consist of hundreds of dynamic and transient components such as instances, disks, networks, and firewall rules. To manage and debug these resources, we often have to look back in time to find answers to questions such as:


  • What was the distribution of instances across zones for the past month?

  • What were the instances with production tag T at time range X?

  • What instances used an external IP address X?

  • What was the aggregated size of disks by zone for the past 7 days?




Wouldn’t it be wonderful if there was a timeline to query using a familiar language such as SQL that has the interactive speed of BigQuery? Building on the Data Pipeline sample application, we have published the Cloud History Tool for Google Compute Engine pipeline that:


  1. Reads the current Compute Engine instance, disk, and operations data using the Compute Engine REST API.

  2. Transforms the data.

  3. Loads the data into BigQuery.

  4. Uses App Engine Cron Services to repeat steps 1 - 3 at scheduled intervals.


Viola! The timeline is now available in BigQuery ready for analysis. The sample also includes a SQL query cookbook to help you to get started with timeline analysis. For example, you can run the following query from the BigQuery Web Interface to find out which disks were not used and not attached to any instances at a given time:

SELECT D.name, D.zoneName
FROM [cloud_history.Disks] D
LEFT OUTER JOIN FLATTEN([cloud_history.Instances], disks) I
ON D.name = I.disks.deviceName AND D.snapshotId = I.snapshotId
WHERE
I.disks.deviceName IS NULL AND
D.snapshotId = TIMESTAMP("YYYY-MM-DD hh:mm:ss")

To display your results graphically, follow this tutorial on “Updating Google Spreadsheets with data from Google BigQuery”. Here is a sample spreadsheet that shows the average number of Compute Engine instances deployed across zones over time.





The instructions for setting up the Cloud History Tool are available here. We invite you to try it out and extend it to suit your needs.



-Posted by Wally Yau, Solutions Architect

Our guest blog post today comes from James Donkin, General Manager Ocado Technology at Ocado, the only dedicated online supermarket in the UK and the world’s largest online grocery retailer. ...
Our guest blog post today comes from James Donkin, General Manager Ocado Technology at Ocado, the only dedicated online supermarket in the UK and the world’s largest online grocery retailer.



Ocado is the world's largest online-only grocery retailer, reaching over 70% of British households, shipping over 150,000 orders a week or 1.1M items a day.



Ocado doesn’t operate out of physical stores. Instead, our customers place their orders online via our webshop and mobile applications. These orders are then picked and packed in huge automated Customer Fulfilment Centres (CFCs), the largest of their kind in the world. They are then delivered to customers’ kitchens in one hour delivery slots by our own delivery fleet.



Technology is at the core of almost everything Ocado does. We consider ourselves a technology company that also does retail. Our culture and make-up is much closer to that of Google than it is a bricks and mortar retailer. We started shipping orders in 2002 and over the past 12 years we have been engaged in a continual process of rapid innovation. Our solution is as unique as our business model and the fact that we own almost every line of source code in this solution means we can evolve it, optimise it and exploit it.



We have a unique business model that is considered highly disruptive within the retail sector, due in part to the scale of automation that we employ.



From the customer’s perspective it’s all about delivering the highest levels of service, quality and choice at a compelling price that all flow from our level of automation - it’s also about providing a customer experience that is irresistible in terms of its convenience and simplicity.



However under the surface, that simplicity does not come easily and is achieved by a huge level of complexity in terms of the processes, automation, software, algorithms, optimisations and data that make it happen. We rely on Google Cloud Platform to do the heavy lifting on data processing and integration so we can focus on what we do best: getting quality groceries to customers in the quickest time possible.



Six months ago, we were ready to make the shift to the cloud and researched Cloud Platform. We were familiar with Google's offerings since we've used Google Apps since 2010. We wanted to evaluate App Engine so we ran a series of intern development projects on this platform and found that the service is easy to use, offers security features like auditing and integrates nicely with other Cloud Platform products including Google Compute Engine and Google Cloud Storage, which increases the productivity and performance of the overall platform. App Engine also scales on demand automatically so that we don’t have to overprovision up front. We can get something live very quickly by just adding a small amount of code and pushing it out, compared to other cloud services where we would have had to build the whole stack from scratch.

big-data-architecture_v01.png

We use Compute Engine to run a big data processing pipeline based on Hadoop and process a terabyte of data per week in order to build better experiences for our customers. Compute Engine is flexible, has a great API, works well with App Engine and has high quality, consistent performance, particularly when starting new instances. We’re moving from more traditional relational database technologies to distributed processing, and with Compute Engine, we can try new technologies quickly and be more agile, rather than having to provision and install additional physical machines. We also use Google Cloud Datastore, which scales easily on demand to handle massive amounts of data.



We use Cloud Storage for secure storage of all data we send to and receive from third-parties and partners. It automatically backs up the data and has a good REST API. Meanwhile, we are experimenting with Google Cloud SQL and are finding it makes it easier to port existing applications to the cloud, and supports immediate atomic consistency, an important feature for some solutions. We don’t have anything in production at the moment but are excited about Cloud SQL’s recent general availability.



Cloud Platform is constantly developing and releasing new products and features that allow us to do even more with our data and applications. The data processing features and web analytics capabilities enable us to optimize our site to provide our customers with the best online experience. The ease, integration and scalability that Google offers with Cloud Platform allow us to offer the simplest, fastest and best online grocery shopping around, which is why customers choose to shop with us.



-Posted by James Donkin, General Manager, Ocado

Accenture recently demonstrated Google Compute Engine as an excellent place to run Hadoop for performance and price. They demonstrated both familiar HDFS-based deployments as well as performance and cost advantages of using the Google Cloud Storage ...
Accenture recently demonstrated Google Compute Engine as an excellent place to run Hadoop for performance and price. They demonstrated both familiar HDFS-based deployments as well as performance and cost advantages of using the Google Cloud Storage connector.



If you use Apache Hive with Hadoop, we want to show you another great feature of the Google Cloud Platform that will save you time and money. The default Hive installation uses a local single-session database as the Hive Metastore to store Hive table and column names, column types, and so on. This local database is fine for single-user/single-session usage, but to use Hive with multiple concurrent connections, you need to install and maintain a relational database such as MySQL.



Google Cloud SQL is managed MySQL in the cloud, which now supports the MySQL wire protocol, so you can connect to Google Cloud SQL using common tools from anywhere. Why not use it to run your MySQL database in the cloud too, and save yourself the time and cost of having to install and maintain MySQL? Let Google take care of it for you.



We provide a sample application to help you get started running Apache Hive and Pig on Google Compute Engine. The README includes detailed instructions for using Cloud SQL for the Hive Metastore.



The rest of this blog post hits the high points for what you need to do to use Google Cloud SQL for the Hive Metastore.



Create a Google Cloud SQL instance

In the Google Cloud Console, create a Google Cloud SQL instance. Make sure to:


  • Choose the Compute Engine zone of the Compute Engine instance running Hive as the preferred location for the Cloud SQL instance.

  • Select "Assign an IP Address" to the Cloud SQL instance.

  • Add the external IP address of the Compute Engine instance as an Authorized IP Address. Be sure to append "/32" to the IP address entered in this field.

  • Define a root password for MySQL (it's good practice).




Install MySQL client and MySQL JDBC Driver

Connect to the Google Compute Engine instance that is running Hive and install both the MySQL client and the MySQL JDBC driver. Add the JDBC driver JAR file to Hive's CLASSPATH. The simplest method is to copy the file to the hive/lib/directory.



Create the hivemeta database and the user to access it

Use the mysql command line tool to:


  • Connect to the Google Cloud SQL instance

  • Create a database called hivemeta (Hive requires the database to use latin1 character encoding, which you'll need to specify explicitly).

  • Create the database user (for example hdpuser).

  • Issue grants on the hivemeta database to the database user.




Configure Hive to use Cloud SQL

Update your hive/conf/hive-site.xml file to connect to the Google Cloud SQL database. Add the following configuration, replacing cloud-sql-ip-addr with the assigned IP address of the Cloud SQL instance, and replacing password with the hdpuser database user password:



Hive is now configured to use the Google Cloud SQL database as its metastore; there's no need for you to maintain a MySQL installation.



Other software that uses MySQL can similarly use Google Cloud SQL. Since Cloud SQL is MySQL, you won't need to migrate code - just establish connectivity and you are off and running.



-Posted by Matt Bookman, Cloud Solutions Architect

Today we are announcing the release of App Engine 1.9.0 which includes the General Availability (GA) of the Modules API, a new MapReduce library for Java developers, as well as improvements to the ...
Today we are announcing the release of App Engine 1.9.0 which includes the General Availability (GA) of the Modules API, a new MapReduce library for Java developers, as well as improvements to the PHP runtime.



App Engine Modules is now Generally Available

We’ve solidified development of the App Engine Modules API and service and we’re happy to announce that Modules is now a generally available feature. With App Engine Modules applications can be split into logical components, where each component has its own set of performance settings, deployments, and versions. We’ve heard from customers that they benefit from the DevOps efficiency that App Engine provides, but need more granular cost and performance controls within their application. App Engine Modules provides improvements in both areas.



With per-Module performance settings, applications can be “tuned” to run more cost effectively. For example, the F4 instance and low pending latency configuration used for serving frontend traffic isn’t always the same configuration that one might use for batch-like data processing. By utilizing per-Module performance settings, the data processing workload can be configured to run on less expensive F1 instances with a higher pending latency threshold, thus driving down the overall cost of the application.



Since each Module has its own set of deployments and versions, DevOps teams can be more agile and efficient, updating or rolling back specific Modules within an application. When there are inter-application dependencies, updates that span an entire set of Modules can be made in lockstep. Integration between Modules is just as easy. All Modules within a given application are able to share services such as Datastore, Memcache, and Task Queues, as well as communicate in a secure fashion via a common auth model that spans the entire application.



If you’re looking to get started, checkout the App Engine Module docs (Java | Python) and samples (Java | Python).



MapReduce library for Java

We’ve seen many customers, both internal to Google and external, using App Engine’s MapReduce libraries and underlying autoscaling service to perform data processing tasks, such as data analysis, migration, and report generation. Today we’re pushing this functionality forward with a Preview release of the MapReduce library for Java that includes built-in integration with Google Cloud Storage and improved support for large datasets. In addition, we’ve also included a bunch of bug fixes.



As with many other App Engine services, there’s no need to set up and maintain dedicated data processing infrastructure. Just import the library into your existing app, implement your map() and reduce() functions, deploy a new Module, and you’re off and running! But don’t take our word for it, give it a try yourself with one of our samples.



PHP

Finally, we’ve been steadily making improvements to App Engine for PHP developers. Our PHP SDK now supports autoloading, which means fewer libraries to include and faster startup times for your application.



If you like to include PHP code fragments from Google Cloud Storage, you can now improve the security of your application by restricting file inclusions to a specific directory of a cloud storage bucket. We’ve also expanded support for working with Google Cloud Storage objects with the new CloudStorageTools::getContentType() and CoudStorageTools::getMetaData() methods.



We’ve also addressed an important bug - the SCRIPT_NAME and PHP_SELF environment variables have been corrected to reflect the typical implementation provided by popular web servers.



The complete list of features and bug fixes for App Engine 1.9.0 can be found in our release notes.



-Posted by Chris Ramsdale, Product Manager




We’re excited to announce that Google Senior Fellow Jeff Dean will speak at Google Cloud Platform Live on March 25 in San Francisco. Jeff will be joining Urs Hölzle and the engineering leadership of Google Cloud Platform as we announce new features for Cloud Platform, take a deep dive on tips, tricks and technology, and share our vision for the future of cloud computing.



We’re excited to announce that Google Senior Fellow Jeff Dean will speak at Google Cloud Platform Live on March 25 in San Francisco. Jeff will be joining Urs Hölzle and the engineering leadership of Google Cloud Platform as we announce new features for Cloud Platform, take a deep dive on tips, tricks and technology, and share our vision for the future of cloud computing.



Jeff joined Google in 1999 and has led a number of innovations in distributed computing. His work has helped us improve search quality, translation services, and web indexing. Jeff helped build Spanner, BigTable, MapReduce, and other pioneering technologies that have shaped the field of computer science.



At Google Cloud Platform Live, Jeff will discuss his experiences at Google and current cutting-edge research and development taking place within the company.



We are nearly at capacity in all our locations, but for people who are still interested in attending you can request an invitation to join us in-person in San Francisco or attend a livestream of the keynote at Google New York City or Google Seattle. And for those who can’t make it in person, you can always tune in online.



-Posted by Greg DeMichillie, Director of Product Management

As a developer today, it’s difficult to anticipate your costs in the cloud. Do you have your own complicated spreadsheet to make product decisions? Would you like to know ahead of time what your new feature will cost?
As a developer today, it’s difficult to anticipate your costs in the cloud. Do you have your own complicated spreadsheet to make product decisions? Would you like to know ahead of time what your new feature will cost?



Today, we’re launching a solution to that problem! So, now you can find out what it will cost to launch your new application or company on Google Cloud Platform. The Google Cloud Platform Pricing Calculator is a simple form for calculating the total cost of deploying your application on Google Cloud Platform. It currently provides lightning fast estimates for Compute Engine, Cloud Storage, and Cloud SQL.



Build an estimate for your entire project in one place. Make changes and optimize the cost of your infrastructure before you even begin development. Mail out the estimate to yourself or the rest of your team. Modify your existing estimate or start from a clean slate. The Google Cloud Platform Pricing Calculator was built to make cost estimation for your next project a snap!











Take the financial guesswork out of running your product in the cloud. Let us help you plan for the next phase of your application and business on Google Cloud Platform. Try the Google Cloud Platform Pricing Calculator today!



-Posted by Brian Lynch, Solutions Architect

App Engine for PHP allows PHP developers to quickly build robust, scalable and secure PHP applications. But the beating heart of almost every great PHP project is a robust MySQL database. Recently we ...
App Engine for PHP allows PHP developers to quickly build robust, scalable and secure PHP applications. But the beating heart of almost every great PHP project is a robust MySQL database. Recently we announced the General Availability of Google Cloud SQL - our enterprise class, fully managed MySQL service. And as you would hope, it integrates seamlessly with Google App Engine.



Because Cloud SQL is based on MySQL, PHP users will find that using App Engine and Cloud SQL together feels very familiar. You can use many standard MySQL tools to manage your app’s Cloud SQL database, such as the MySQL command-line client, MySQL Workbench, phpMyAdmin, as well as the Cloud SDK. You can even set up phpMyAdmin as an App Engine app itself.



Cloud SQL allows developers to spin up complex PHP applications on App Engine very easily - and take advantage of App Engine’s security and scalability. For example, it is trivial to get WordPress running on App Engine.



There are lots of features that make Cloud SQL a great fit for sites with low and intermittent traffic.


  • The per-use billing plan means you only pay for the time the database is being accessed; the rest of the time you only pay for storage. You can also start with a small instance costing just $0.025/h, and at any time you can increase capacity with just a few seconds downtime.

  • The same scalability applies to storage: you don't need to reserve space in advance, and you only pay for the data you actually store — up to a whopping 500GB.

  • Reliability and robustness are crucial, so all data is replicated multiple times in multiple locations, and automatically backed up. All data is also encrypted when stored, and when on Google's networks.


While being able to run applications on the cheap is nice, Cloud SQL is also being used by large businesses like Costco to provide storage for major e-commerce sites, because of features like automated backups, data replication, and automated patches. In fact, SaaS providers like Kissflow can provide a database for each of the customers of their workflow service, without worrying about issues like noisy neighbors or resource allocation.



Links:

WordPress starter project

Google Cloud Platform project sign-up

Cloud SQL documentation

Getting Started with App Engine for PHP



-Posted by Amy Unruh, Developer Relations

We have published a sample App Engine application to help you move your data from one place in the cloud to another, transforming it along the way. The Data Pipeline applicatio ...
We have published a sample App Engine application to help you move your data from one place in the cloud to another, transforming it along the way. The Data Pipeline application includes samples to get you started quickly and produce powerful pipelines right out the gate. It also has a simple API for extending its functionality.



Data Pipeline is a Python application that uses Google App Engine Pipeline API to control complex data processing pipelines. Pipelines are built of stages that can be wired together to process large amounts of data, with work going on in parallel. The application comes with several sample stages that use many of the Cloud Platform services. You can easily write new stages to perform custom data processing.



The Data Pipeline app comes with built-in functionality that lets you read data from:


  • URLs via HTTP

  • Google Cloud Datastore

  • Google Cloud Storage


transform it on:


and output it to:


  • BigQuery

  • Google Cloud Storage


For example, one of the pre-built dataflows takes a file from a Cloud Storage bucket, transforms it using a MapReduce job on Hadoop running on Compute Engine, and uploads the output file to BigQuery. To kick off the process, simply drop the file into Cloud Storage.



We hope that you will not only use the built-in transformations, but will create custom stages to transform data in whatever way you need. You can customize the pipelines easily by extending the Python API, which is available here on Github.



You can also customize the input and output; for example, you could customize the output to write to Google Cloud SQL.



You create and edit pipelines in a JSON configuration file in the application's UI. The app checks that the configuration is syntactically correct and each stage’s preconditions are met. After you save the config file, click the Run button to start the pipeline execution. You'll see the progress of the running pipeline in a new window.




Editing the config file

The source code is checked into Github. We invite you to download it and set up your pipelines today.



- Posted by Alex K, Cloud Solutions Engineer

Today’s guest blog comes from Cory Isaacson, CEO/CTO at CodeFutures. CodeFutures is the maker of dbShards Technology, a proven suite of components and tools for working with relational database management systems. dbShards database clusters have been in production for over 3 years in demanding applications supporting multi-terabyte databases with high read and write loads. ...
Today’s guest blog comes from Cory Isaacson, CEO/CTO at CodeFutures. CodeFutures is the maker of dbShards Technology, a proven suite of components and tools for working with relational database management systems. dbShards database clusters have been in production for over 3 years in demanding applications supporting multi-terabyte databases with high read and write loads.



Based on our extensive expertise in the database scalability, we were intrigued to work with Google Cloud SQL because if its reliability features. For example, every byte written to Cloud SQL is stored multiple times in multiple locations, so the data is safe and available even in the case of multiple outages, an unmatched capability with Database as a Service vendors.



We initially tested with our dbShards/Migrate tools, allowing customers to seamlessly move their databases from any location — a traditional data center or another cloud vendor — to Google Cloud SQL. The product is based on dbShards patented replication technology, called Continuous Replication, that allows customers to replicate their data from outside the DBMS engine. This results in a no-risk experience without downtime. dbShards/Migrate can also be used to maintain a disaster recovery site for their database, in a remote cloud region, or even hosted by a totally different cloud vendor.



The key to dbShards/Migrate is its ability to continuously and reliably replicate transactions from one database or cluster to another in a remote location over the internet as a wide area network. Because the product replicates transactions outside the DBMS, it is is even possible to replicate from a Database as a Service where access to standard vendor replication facilities may not be available. While dbShards/Migrate continuously replicates transactions from the source to the target environment, customers can perform a reliable point-in-time snapshot of the source database, restoring it in the target environment with no lost data. It is even possible to perform the process several times to ensure full testing of the new cloud environment before switching live application servers to the target provider.







During our tests, Cloud SQL performed extremely well. Our objective was to provide our initial test customer (http://www.genoo.com) with a near-zero downtime transition of their database from their existing cloud vendor to Google Cloud SQL. Using the Cloud SQL capabilities, we were able to perform the process repeatedly — and flawlessly. In fact, our customer told us they did not even notice that the transition had occurred. You can read more in this case study.



An important factor with Cloud SQL is its built-in redundancy. As mentioned earlier, data written to Cloud SQL is stored multiple times in multiple locations, offering an incredible level of reliability. dbShards replication technology can be used to supplement Cloud SQL’s reliability, to perform seamless database modifications when needed — all without downtime.



dbShards is of course well-known for its industry leading database sharding capabilities. This will be of particular benefit to large database users in Cloud SQL, as currently Cloud SQL has a limit of 500GB per instance. Using dbShards, a customer can support multiple terabytes of data, completely eliminating this limitation as a concern.



Next steps for CodeFutures will be to benchmark our scalability in Cloud SQL, validating dbShards sharding capabilities and comparing the results to other cloud vendors and MySQL alternatives.



Learn more about dbShards/Migrate here.



-Contributed by Cory Isaacson, CEO/CTO, CodeFutures

Today’s guest post comes from Fritz Mueller, vice president of products at LiveHive, a cloud-based sales engagement platform that allows B2B sales teams to track customer touchpoints in real-time.



Founded in 2011, LiveHive enables sales teams to share materials with their customers and monitor how customers interact with these materials. Our service is cloud-based, which means sales teams who are often on the road can easily track their customers’ activities in real-time, and on the go.
Today’s guest post comes from Fritz Mueller, vice president of products at LiveHive, a cloud-based sales engagement platform that allows B2B sales teams to track customer touchpoints in real-time.



Founded in 2011, LiveHive enables sales teams to share materials with their customers and monitor how customers interact with these materials. Our service is cloud-based, which means sales teams who are often on the road can easily track their customers’ activities in real-time, and on the go.



From the beginning of the company, LiveHive wanted to outsource infrastructure management in a cost effective manner. We chose Google App Engine and Google Cloud SQL because we wanted to focus our efforts on the product functionality that our customers wanted and not spend time dealing with infrastructure issues, including system maintenance, reliability, scalability and database administration.



LiveHive stores sales analytics, our customer-facing functionality and product usage metrics for internal business planning in Cloud SQL, which we’ve been using for the past six months. Our customer-facing sales analytics, viewed through interactive charts, graphs and maps online and via mobile device, are all driven by data in Cloud SQL.





Cloud SQL updates sales analytics and usage metrics continuously so customers and internal teams always have access to the latest information. We conduct trend and cohort analysis on the internal product usage metrics. This analysis identifies what features are most popular, which helps our sales and marketing teams understand what current and potential customers want in our product. LiveHive sales analytics tell our customers which sales materials their prospects find useful and then ranks prospect interest with our opportunity scoring system.



From a database perspective, Cloud SQL met our two key requirements: full functionality of a relational database and easy integration with our cloud platform application. Our initial setup with Cloud SQL was fast and seamless. Now, we have multiple database instances running with access to databases from any of our App Engine applications, which we’ve been using since 2011. The LiveHive sales engagement platform runs on App Engine and is accessed by customers through our web based user interface or mobile applications. This flexible access between App Engine and Cloud SQL allows us to maintain a test database that can be accessed from multiple development versions of the LiveHive application as well as a completely separate production environment. In both environments, our costs scale with usage, which is a big plus for us since we only pay for what we use.



We have already achieved one of our goals: to spend no time managing performance, reliability, administration or maintenance issues! Cloud SQL has more than met our expectations of a cloud-based relational database, and we continue to derive value from it.



-Contributed by Fritz Mueller, Vice President of Products, LiveHive

Please join me and the senior engineering leadership of Google Cloud Platform at Google Cloud Platform Live in San Francisco on March 25, 2014. We’ll announce a number of new products, features and updates to Google Cloud Platform and showcase the investments we’re making in building the world’s best public cloud.
Please join me and the senior engineering leadership of Google Cloud Platform at Google Cloud Platform Live in San Francisco on March 25, 2014. We’ll announce a number of new products, features and updates to Google Cloud Platform and showcase the investments we’re making in building the world’s best public cloud.



We are making a small number of tickets available to the general public to attend the event in San Francisco, so request a spot early in order to be on the list. For people who can’t attend in person, we are opening our offices in New York City and Seattle to a limited number of guests for a live viewing party with local flavor. And for people across the globe, you can tune in on YouTube to catch all the sessions live.



See you on March 25th!



-Posted by Urs Hölzle, Senior Vice President

Google Cloud SQL is a fully managed MySQL service hosted on Google Cloud Platform, providing a database backbone for applications running on Google App Engine or Google Compute Engine. Today, we are announcing Cloud SQL is generally available (GA), now with: encryption of customer data, a 99.95% uptime SLA, and support for databases up to 500GB in size.
Google Cloud SQL is a fully managed MySQL service hosted on Google Cloud Platform, providing a database backbone for applications running on Google App Engine or Google Compute Engine. Today, we are announcing Cloud SQL is generally available (GA), now with: encryption of customer data, a 99.95% uptime SLA, and support for databases up to 500GB in size.



Secure Encrypted Data

Cloud SQL data is now automatically encrypted. This adds to the existing security and reliability features, including:


  • Customer data, including in database tables and temporary files, is automatically stored encrypted (with encryption of backups coming soon).

  • All Cloud SQL traffic on Google’s internal networks is encrypted.

  • External connections can be encrypted using SSL.

  • All hosts and Google App Engine applications connecting to your instance must be explicitly authorized.

  • MySQL user grants can be used to control access at the database, table, or even column level.

  • Data is replicated multiple times in multiple locations.

  • Scheduled backups are automatically taken by default.


Larger databases

All Cloud SQL instances can now store up to 500GB, from our smallest D0 instance costing just $0.025 per hour up to D32 instances with 16GB of RAM. Your data is replicated multiple times in multiple zones and automatically backed up, all included in the price of the service. And you only pay for the storage that you actually use, so you don’t need to reserve this storage in advance.



SLA for availability

Replicated storage means we can guarantee 99.95% availability of the service. And because even a reduced service is not acceptable for many applications, we have set a high bar for availability: for example, we regard a single minute of just 20% connection failure as a downtime. See the SLA for more details.



Developer traction

Cloud SQL has seen some great developer traction, with a range of businesses relying on it for core applications:


  • Costco uses Google Compute Engine and Cloud SQL to run public e-commerce sites. As Don Burdick, Senior Vice President of Global Ecommerce at Costco, says, “Costco is the world's leading membership club warehouse with annual sales exceeding $100B. As part of our philosophy to keep costs down and pass savings on to our members, in June 2013 we implemented our ecommerce site for Mexico on Google Cloud Platform. The site has been operational since October 2013 and the Google Cloud Platform performance has exceeded our expectations. As a result of this project's success, we're currently migrating the website of one of our other countries to Google Cloud Platform.”

  • LiveHive is a social selling application used by 25,000+ sales professionals. Fritz Mueller, Vice President of Products says, "We found Google's Cloud SQL service to be an ideal combination of performance and convenience. Performance is key to us because we provide our customers with real-time data about their sales execution. With Google's Cloud SQL, we focus on building the functionality our customers want without worrying about reliability, scalability and upgrades."

  • Ocado manages logistics and e-commerce for some of the largest supermarkets in the UK. General Manager James Donkin says, “We're excited about the flexibility Cloud SQL brings to support quick development cycles that foster innovation, while scaling easily when required.”

  • Mark Kornfilt, co-founder of Live video streaming platform Livestream, said “Thanks to Google App Engine and Cloud SQL, we were able to go from a new product concept to its launch in less than two months. This allows us to focus on building the product instead of worrying about operations, and provides all the tools needed to build a robust, reliable and scalable web app out of the box.”




Try it now

Learn more about Google Cloud SQL and try it now here.



-Posted by Joe Faith, Product Manager

When you’re building a healthcare-related application, not only do you need the right code and a reliable user experience, sometimes it feels like you need to be a lawyer too. Often, there are several additional steps to take to into consideration. In particular, some healthcare-related applications and services in the United States are required to comply with the ...
When you’re building a healthcare-related application, not only do you need the right code and a reliable user experience, sometimes it feels like you need to be a lawyer too. Often, there are several additional steps to take to into consideration. In particular, some healthcare-related applications and services in the United States are required to comply with the Health Insurance Portability and Accountability Act (HIPAA) regulations. HIPAA establishes standards around privacy, security, and breach notification to protect individually identifiable health information. When building in the cloud, it can be challenging to ensure that you’re complying with these regulations.



To serve developers who want to build these applications on Google's infrastructure, we're announcing support for Business Associates Agreements (BAAs) for our customers. A BAA is the contract between a Covered Entity (you, the developer) and their Business Associate (Google) covering the handling of HIPAA-protected information.



Today’s news joins our other compliance efforts across Cloud Platform and Google Enterprise:




  • ISO 27001: ISO 27001 is one of the most widely recognized, internationally accepted independent security standards. After earning ISO 27001 for Google Apps in 2012, we renewed our certification again last year for Google Apps and received the certification for Google Cloud Platform.

  • SOC2, SSAE 16 & ISAE 3402: Companies use the SOC2, SSAE 16 Type II audit, and its international counterpart ISAE 3402 Type II audit, to document and verify the data protections in place for their services. We’ve successfully completed these audits for Google Apps every year since 2008 (when the audits were known by their previous incarnation, SAS 70) and we did so again last year for Google Apps and Google Cloud Platform.

  • HIPAA: Late last year, we started entering into BAAs to allow Google Apps customers to support HIPAA regulated data. This year we have begun entering into BAAs with our Google Cloud Platform customers.




We’re looking forward to supporting customers who are subject to HIPAA regulations on Google Cloud Platform. If you are a Covered Entity under HIPAA and would like more information, please contact our team.



-Posted by Matthew O’Connor, Product Manager

If you’re new to App Engine, then the file system model may be a bit different from what you might have experienced using other hosts.



With an App Engine application, you cannot write to the file-system where your application is deployed. Your application can ...
If you’re new to App Engine, then the file system model may be a bit different from what you might have experienced using other hosts.



With an App Engine application, you cannot write to the file-system where your application is deployed. Your application can read any files from the deployed directory structure, but it can’t write to that file-system. Instead, the application can use Google Cloud Storage (GCS) for both reading and writing files.

To convert an app to use GCS for writable files, here are the primary things that you will typically need to do:

Another implication of the read-only file system is that if your app has a ‘plugin’ model, like WordPress, you can’t install or update plugins from your deployed app. Instead, you will need to install or update any plugins locally, then redeploy the app.



You can find lots more info on all of the following in the documentation for the PHP runtime.



The Application Filesystem

With App Engine applications, the ‘local’ filesystem — the project directory tree, which is uploaded with your deployed app — is read-only. This constraint is imposed for scalability and security reasons; sometimes it’s referred to as ‘sandboxing’. (And, many common framework vulnerabilities are indeed blocked by App Engine apps).



You can read any file in this deployed directory structure, for example your application might read deployed template or configuration files. (If in your app code you want to to read files you’re also serving statically, you can use the application_readable directive in your app.yaml file).

Importantly, your application can’t create or modify files in this local file system — e.g., it can’t write cache files there.



Because of this sandboxing, if your app has a ‘plugin’ model, like WordPress, you can’t install or update plugins from your deployed app. Instead, you’ll need to install or update them locally, in your development environment, by running your app using App Engine’s development server. You can then test the update locally, if you like, and then redeploy the app with the updates. If you’re comfortable doing so, you can also just download and unzip the plugin files directly, move them to the proper directory, and redeploy; rather than installing them via the WordPress administration console.



(Note that if you make any database-stored changes from the development server, like setting plugin options, these of course won’t propagate to your deployed app, which is using a different database. Once you re-deploy your app with the new plugin files, you can configure the plugin in the deployed app).



Google Cloud Storage 

For a read/write filesystem, your application can instead use Google Cloud Storage (GCS) buckets[1]. Google Cloud Storage is a RESTful service for storing and accessing your data objects on Google’s infrastructure. GCS is fast, scalable, and highly available, with multiple layers of redundancy; and stored objects can be terabytes in size.



For the App Engine PHP runtime, there is a GCS stream wrapper that supports the majority of standard file-system-related functions. This stream wrapper lets you use PHP file and directory functions such as file_put_contents, file_get_contents, fopen, and opendir. File and directory information can be retrieved for GCS objects using functions like file_exists, is_writable, filesize, is_dir, etc.



You point to a GCS directory or file using syntax like this:



gs:///path/to/file
So, you can write app code like this:

$fp = fopen("gs://my_bucket/some_file.txt", "w");
fwrite($fp, "Hello");
fclose($fp);
or:

$options = [ "gs" => [ "Content-Type" => "text/plain" ]];
$ctx = stream_context_create($options);
file_put_contents("gs://my_bucket/hello.txt", "Hello", 0, $ctx);
See the documentation for more detail and examples.

(Before code like this will work in your app, you will need to set up GCS in a Google Cloud project and authorize your app engine app for that project, as described here).



For the most part, once you’ve redefined your paths to gs:// URIs, your file-system calls will just work as before. You may want to check config settings for your app before you deploy it, to ensure that write paths use a GCS bucket path instead of a local filesystem path. E.g., you may need to point cache directories to GCS.



However, one way in which GCS is not like a ‘usual’ filesystem is that GCS does not support file (object) appends. Instead of appending to a file, you must write a new version of that file that has the updated content.



One context in which this can come up is logging, and a good alternative is to simply use syslog for logging. All of your app’s calls to syslog, and the standard error stream, will be included in your app’s Admin Console logs, where you can search them. You can also use the Logs API to access the logs programmatically. (We will look at the Logs API in more detail in a subsequent post, and talk about how you can use it to, e.g., email periodic reports, and to store logs in GCS). You can also download the logs using the appcfg.py request_logs command.



‘Including’ Files From GCS

You can include or require files from GCS in your application. This, e.g., allows you to write/read cached or compiled templates. For security reasons, you need to explicitly enable this feature. You do this by specifying which buckets contain includable files, using the google_app_engine.allow_include_gs_buckets directive in your php.ini file, e.g.:



google_app_engine.allow_include_gs_buckets = "bucket_1, bucket_2"
You can use this feature to use templating libraries like Twig or Smarty with your PHP App Engine app.



Uploading Files to GCS From Your App

Your app can’t use the read-only filesystem to store uploaded files. Instead, it can use GCS to store uploads (and, GCS is great at handling large files and lots of them). App Engine makes this process very straightforward.



To upload files from your app, you generate a special upload URL, specifying a result handler as a ‘callback’, and use this special URL in your upload form. Once the file is uploaded, the ‘callback’ handler receives a POST request, from which the upload can be processed. See the documentation for the details.



If you are running WordPress on App Engine, we have built a plugin which (amongst other features) supports uploading to and accessing media from GCS, so that all you need to do is install the plugin.



Similarly, for other apps, you will likely need to modify existing upload forms so that they use this generated upload URL, which will then call back to the existing handler (which can process the temp file just as before).



Once your app is succesfully writing files to GCS, there are a number of ways for your app to access them and serve them, in addition to simply using the GCS stream wrapper. We’ll describe those in a follow-on post.



A Recap

With App Engine apps, your app can read from the deployed directory structure, but it can’t write to it. Instead, it can use GCS for that. There are three main things you will probably have to do, in order to convert an app to use GCS:

Finally, the ‘sandboxing’ of the app filesystem dictates that you can’t modify this filesystem from your deployed app. So, for WordPress plugins and similar, you’ll need to install/update plugins locally using the development server, and re-deploy your app.



In following posts, we’ll describe the various ways that your app can access and serve the files that are in GCS, and talk more about the Logs API and how you can use it.



-Posted by Amy Unruh, Developer Programs Engineer



1. Your app also has access to memcache, and to persistent stores like Google Cloud SQL and Cloud Datastore, but we won’t cover these in this post.