Transaction ordering

Nodes of a database service may receive a read request to perform a read of a record stored by the database service and a transaction request to perform a transaction to the record. First and second indications of time may be associated with the read and transaction, respectively. A potential read anomaly (e.g., fuzzy read, read skew, etc.) may be detected based, at least in part, on a determination that the first indication of time is within a threshold value of the second indication of time. In response to detecting the potential read anomaly, the read may be performed after the transaction specified by the transaction request, regardless of whether the first indication of time is indicative of an earlier point in time than the second indication of time.

BACKGROUND

Distribution of various components of a software stack can in some cases provide (or support) fault tolerance (e.g., through replication), higher durability, and less expensive solutions (e.g., through the use of many smaller, less-expensive components rather than fewer large, expensive components). However, databases have historically been among the components of the software stack that are least amenable to distribution. For example, it can be difficult to distribute databases while still ensuring the so-called ACID properties (e.g., Atomicity, Consistency, Isolation, and Durability) that they are expected to provide. Specifically regarding the Consistency and Isolation properties, coordinating between nodes of a distributed database system to preserve causality across the nodes has proven very difficult for prior systems.

While embodiments are described herein by way of example for several embodiments and illustrative drawings, those skilled in the art will recognize that the embodiments are not limited to the embodiments or drawings described. It should be understood, that the drawings and detailed description thereto are not intended to limit embodiments to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope as defined by the appended claims. The headings used herein are for organizational purposes only and are not meant to be used to limit the scope of the description or the claims. As used throughout this application, the word “may” is used in a permissive sense (i.e., meaning having the potential to), rather than the mandatory sense (i.e., meaning must). The words “include,” “including,” and “includes” indicate open-ended relationships and therefore mean including, but not limited to. Similarly, the words “have,” “having,” and “has” also indicate open-ended relationships, and thus mean having, but not limited to. The terms “first,” “second,” “third,” and so forth as used herein are used as labels for nouns that they precede, and do not imply any type of ordering (e.g., spatial, temporal, logical, etc.) unless such an ordering is otherwise explicitly indicated.

Various components may be described as “configured to” perform a task or tasks. In such contexts, “configured to” is a broad recitation generally meaning “having structure that” performs the task or tasks during operation. As such, the component can be configured to perform the task even when the component is not currently performing that task (e.g., a computer system may be configured to perform operations even when the operations are not currently being performed). In some contexts, “configured to” may be a broad recitation of structure generally meaning “having circuitry that” performs the task or tasks during operation. As such, the component can be configured to perform the task even when the component is not currently on. In general, the circuitry that forms the structure corresponding to “configured to” may include hardware circuits.

DETAILED DESCRIPTION

Various embodiments of transaction ordering are disclosed. Various ones of the present embodiments may include nodes (e.g., of a database service) receiving a read request to perform a read of a stored record and a transaction request to perform a transaction (e.g., write, etc.) to the record. Various ones of the present embodiments may also include the nodes associating first and second indications of time with the read and transaction, respectively. Various ones of the present embodiments may further include detecting a potential read anomaly (e.g., fuzzy read, read skew, etc.) based, at least in part, on a determination that the first indication of time is within a threshold value of the second indication of time. Note that, in some embodiments, detection may also be based on indications of time other than the first and second indications of time. In response to detecting the potential read anomaly, the read may be performed after the transaction specified by the transaction request, regardless of whether the first indication of time is indicative of an earlier point in time than the second indication of time. In some instances, the read may be retried such that a potential read anomaly does not occur for the retry.

The specification first describes an example web services-based database service configured to implement the disclosed transaction ordering techniques. Included in the description of the example web services-based database service are various aspects of the example web services-based database service, such as a database engine and a separate distributed database storage service (note that, in some embodiments, the storage service may not be separate from the database engine). The specification then describes flowcharts of various embodiments of methods for transaction ordering. Next, the specification describes an example system that may implement the disclosed techniques. Various examples are provided throughout the specification. Note that the disclosed transaction ordering techniques may be used in systems other than the example database service ofFIGS. 1-5, such as other systems that are usable to read, write, and store data. For example, the disclosed techniques may be used in any system in which the following may occur: a read of data and a sequence of updates to the data with a point in time at which those updates are made visible to the read.

The systems described herein may, in some embodiments, implement a web service that enables clients (e.g., subscribers) to operate a data storage system in a cloud computing environment. In some embodiments, the data storage system may be an enterprise-class database system that is highly scalable and extensible. In some embodiments, queries may be directed to database storage that is distributed across multiple physical resources, and the database system may be scaled up or down on an as needed basis. The database system may work effectively with database schemas of various types and/or organizations, in different embodiments. In some embodiments, clients/subscribers may submit queries in a number of ways, e.g., interactively via an SQL interface to the database system. In other embodiments, external applications and programs may submit queries using Open Database Connectivity (ODBC) and/or Java Database Connectivity (JDBC) driver interfaces to the database system.

More specifically, the systems described herein may, in some embodiments, implement a service-oriented database architecture in which various functional components of a single database system are intrinsically distributed. For example, rather than lashing together multiple complete and monolithic database instances (each of which may include extraneous functionality, such as an application server, search functionality, or other functionality beyond that required to provide the core functions of a database), these systems may organize the basic operations of a database (e.g., query processing, transaction management, caching and storage) into tiers that may be individually and independently scalable. For example, in some embodiments, each database instance in the systems described herein may include a database tier (which may include a single database engine head node and a client-side storage system driver), and a separate, distributed storage system (which may include multiple storage nodes that collectively perform some of the operations traditionally performed in the database tier of existing systems). As noted herein, the described transaction ordering techniques may apply equally in other systems as well.

As described in more detail herein, in some embodiments, some of the lowest level operations of a database, (e.g., backup, restore, recovery, log record manipulation, and/or various space management operations) may be offloaded from the database engine to the storage layer and distributed across multiple nodes and storage devices. For example, in some embodiments, rather than the database engine applying changes to database tables (or data pages thereof) and then sending the modified data pages to the storage layer, the application of changes to the stored database tables (and data pages thereof) may be the responsibility of the storage layer itself. In such embodiments, redo log records, rather than modified data pages, may be sent to the storage layer, after which redo processing (e.g., the application of the redo log records) may be performed somewhat lazily and in a distributed manner (e.g., by a background process). In some embodiments, crash recovery (e.g., the rebuilding of data pages from stored redo log records) may also be performed by the storage layer and may also be performed by a distributed (and, in some cases, lazy) background process.

In some embodiments, because only redo logs (and not modified data pages) are sent to the storage layer, network traffic between the database tier and the storage layer may be greatly reduced compared to network traffic in existing database systems. In some embodiments, each redo log may be on the order of one-tenth the size of the corresponding data page for which it specifies a change. Note that requests sent from the database tier and the distributed storage system may be asynchronous and that multiple such requests may be in flight at a time.

In general, after being given a piece of data, a primary requirement of a database is that it can eventually give that same piece of data back. To do this, the database may include several different components (or tiers), each of which performs a different function. For example, a traditional database may be thought of as having three tiers: a first tier for performing query parsing, optimization and execution; a second tier for providing transactionality, recovery, and durability; and a third tier that provides storage, either on locally attached disks or on network-attached storage. As noted above, traditional attempts to scale a traditional database have typically involved replicating all three tiers of the database and distributing those replicated database instances across multiple machines.

In some embodiments, the systems described herein may partition functionality of a database system differently than in a traditional database, and may distribute only a subset of the functional components (rather than a complete database instance) across multiple machines in order to implement scaling. For example, in some embodiments, a client-facing tier may be configured to receive a request specifying what data is to be stored or retrieved, but not how to store or retrieve the data. This tier may perform request parsing and/or optimization (e.g., SQL parsing and optimization), while another tier may be responsible for query execution. In some embodiments, a third tier may be responsible for providing transactionality and consistency of results. For example, this tier may be configured to enforce some of the so-called ACID properties, in particular, the Atomicity of transactions that target the database, maintaining Consistency within the database, and ensuring Isolation between the transactions that target the database. In some embodiments, the third tier may implement the disclosed transaction ordering techniques. In some embodiments, a fourth tier may then be responsible for providing Durability of the stored data in the presence of various sorts of faults. For example, this tier may be responsible for change logging, recovery from a database crash, managing access to the underlying storage volumes and/or space management in the underlying storage volumes.

Turning now to the figures,FIG. 1is a block diagram illustrating various components of a database software stack, according to one embodiment. As illustrated in this example, a database instance may include multiple functional components (or layers), each of which provides a portion of the functionality of the database instance. In this example, database instance100includes a query parsing and query optimization layer (shown as110), a query execution layer (shown as120), a transactionality and consistency management layer (shown as130), and a durability and space management layer (shown as140). As noted above, in some existing database systems, scaling a database instance may involve duplicating the entire database instance one or more times (including all of the layers illustrated inFIG. 1), and then adding glue logic to stitch them together. In some embodiments, the systems described herein may instead offload the functionality of durability and space management layer140from the database tier to a separate storage layer, and may distribute that functionality across multiple storage nodes in the storage layer. Note that the disclosed transaction ordering techniques may also apply in embodiments in which the durability and space management layer140is part of the database tier.

In various embodiments, the database systems described herein may support a standard or custom application programming interface (API) for a variety of database operations/transactions. For example, the API may support operations for creating a database, creating a table, altering a table, creating a user, dropping a user, inserting one or more rows in a table, copying values, selecting data from within a table (e.g., querying a table), canceling or aborting a query, and/or other operations.

In some embodiments, the database tier of a database instance may include a database engine head node server (which may also be referred to as a primary node) that receives read and/or write requests (and/or other transaction requests) from various client programs (e.g., applications) and/or subscribers (users), then parses them and develops an execution plan to carry out the associated database operation(s). For example, the database engine head node may develop the series of steps necessary to obtain results for complex queries and joins. In some embodiments, the database engine head node may manage communications between the database tier of the database system and clients/subscribers, as well as communications between the database tier and a separate distributed database-optimized storage system. In some embodiments, as described in more detail below, the database engine head node may be configured to perform transaction ordering, which may help preserve a particular isolation level (e.g., read consistent, etc.).

In some embodiments, the database tier (or more specifically, the database engine head node) may include a cache in which recently accessed data pages are held temporarily. In such embodiments, if a write request is received that targets a data page in such a cache, in addition to shipping a corresponding redo log record to the storage layer, the database engine may apply the change to the copy in its cache. However, unlike in other database systems, a data page held in this cache may not ever be flushed to the storage layer, and it may be discarded at any time (e.g., at any time after the redo log record for a write request that was most recently applied to the cached copy has been sent to the storage layer and acknowledged). The cache may implement any of various locking mechanisms to control access to the cache by at most one writer (or multiple readers) at a time, in different embodiments. Note, however, that in embodiments that include such a cache, the cache may not be distributed across multiple nodes, but may exist only on the database engine head node for a given database instance. Therefore, there may be no cache coherency or consistency issues to manage. Also note, though, that multiple database instances, each with a database engine head node, may exist.

In some embodiments, the database tier may support the use of synchronous or asynchronous read replicas in the system, e.g., read-only copies of data on different nodes of the database tier to which read requests can be routed. In such embodiments, if the database engine head node for a given database table receives a read request directed to a particular data page, it may route the request to any one (or a particular one) of these read-only copies. In some embodiments, the client-side driver in the database engine head node may be configured to notify these other nodes about updates and/or invalidations to cached data pages (e.g., in order to prompt them to invalidate their caches, after which they may request updated copies of updated data pages from the storage layer).

In some embodiments, the client side driver may maintain metadata about the volume and may directly send asynchronous requests to each of the storage nodes necessary to fulfill read requests and write requests without requiring additional hops between storage nodes. For example, in some embodiments, in response to a request to make a change to a database table, the client-side driver may be configured to determine the one or more nodes that are implementing the storage for the targeted data page, and to route the redo log record(s) specifying that change to those storage nodes. The storage nodes may then be responsible for applying the change specified in the redo log record to the targeted data page at some point in the future. As writes are acknowledged back to the client-side driver, the client-side driver may advance the point at which the volume is durable and may acknowledge commits back to the database tier. As previously noted, in some embodiments, the client-side driver may not ever send data pages to the storage node servers. This may not only reduce network traffic, but may also remove the need for the checkpoint or background writer threads that constrain foreground-processing throughput in previous database systems.

In some embodiments, the client side driver may perform the disclosed transaction ordering, for a database engine head node that receives a read request to retrieve multiple records, as described herein. For example, a database engine head node of the database service may receive a read request to perform a read of a record stored by the database service. Another database engine head node may receive a transaction request to perform a transaction (e.g., write, etc.) to the record. The database engine head node that received the read request may detect a potential read anomaly (e.g., fuzzy read, read skew, etc.) based on a determination that an indication of time associated with the read is within a threshold value of a second indication of time associated with the transaction. In response to detecting the potential read anomaly, the read may be performed after the transaction specified by the transaction request, regardless of whether the first indication of time is indicative of an earlier point in time than the second indication of time. In some instances, the read may be retried such that a potential read anomaly does not occur for the retry. Note that a database engine head node may, at one time, receive a read request to query a data table, and at another time, receive a transaction request to modify a data table. Various example timing diagrams of a normal read, a fuzzy read, and a read skew are illustrated atFIGS. 7A-C, as described below.

In some embodiments, many read requests may be served by the database engine head node cache. However, write requests may require durability, since large-scale failure events may be too common to allow only in-memory replication. Therefore, the systems described herein may be configured to minimize the cost of the redo log record write operations that are in the foreground latency path by implementing data storage in the storage tier as two regions: a small append-only log-structured region into which redo log records are written when they are received from the database tier, and a larger region in which log records are coalesced together to create new versions of data pages in the background. In some embodiments, an in-memory structure may be maintained for each data page that points to the last redo log record for that page, backward chaining log records until an instantiated data block is referenced. This approach may provide good performance for mixed read-write workloads, including in applications in which reads are largely cached.

One embodiment of a service system architecture that may be configured to implement a web services-based database service is illustrated inFIG. 2. In the illustrated embodiment, a number of clients (shown as database clients250a-250n) may be configured to interact with a web services platform200via a network260. Web services platform200may be configured to interface with one or more instances of a database service210, a distributed database-optimized storage service220and/or one or more other virtual computing services230. It is noted that where one or more instances of a given component may exist, reference to that component herein may be made in either the singular or the plural. However, usage of either form is not intended to preclude the other.

In various embodiments, the components illustrated inFIG. 2may be implemented directly within computer hardware, as instructions directly or indirectly executable by computer hardware (e.g., a microprocessor or computer system), or using a combination of these techniques. For example, the components ofFIG. 2may be implemented by a system that includes a number of computing nodes (or simply, nodes), each of which may be similar to the computer system embodiment illustrated inFIG. 8and described below. In various embodiments, the functionality of a given service system component (e.g., a component of the database service or a component of the storage service) may be implemented by a particular node or may be distributed across several nodes. In some embodiments, a given node may implement the functionality of more than one service system component (e.g., more than one database service system component).

Generally speaking, clients250may encompass any type of client configurable to submit web services requests to web services platform200via network260, including requests for database services (e.g., a transaction request, a read request, etc.). For example, a given client250may include a suitable version of a web browser, or may include a plug-in module or other type of code module configured to execute as an extension to or within an execution environment provided by a web browser. Alternatively, a client250(e.g., a database service client) may encompass an application such as a database application (or user interface thereof), a media application, an office application or any other application that may make use of persistent storage resources to store and/or access one or more database tables. In some embodiments, such an application may include sufficient protocol support (e.g., for a suitable version of Hypertext Transfer Protocol (HTTP)) for generating and processing web services requests without necessarily implementing full browser support for all types of web-based data. That is, client250may be an application configured to interact directly with web services platform200. In some embodiments, client250may be configured to generate web services requests according to a Representational State Transfer (REST)-style web services architecture, a document- or message-based web services architecture, or another suitable web services architecture.

In some embodiments, a client250(e.g., a database service client) may be configured to provide access to web services-based storage of database tables to other applications in a manner that is transparent to those applications. For example, client250may be configured to integrate with an operating system or file system to provide storage in accordance with a suitable variant of the storage models described herein. However, the operating system or file system may present a different storage interface to applications, such as a conventional file system hierarchy of files, directories and/or folders. In such an embodiment, applications may not need to be modified to make use of the storage system service model ofFIG. 1. Instead, the details of interfacing to Web services platform200may be coordinated by client250and the operating system or file system on behalf of applications executing within the operating system environment.

Clients250may convey web services requests (e.g., a transaction request, read request, etc.) to and receive responses from web services platform200via network260. In various embodiments, network260may encompass any suitable combination of networking hardware and protocols necessary to establish web-based communications between clients250and platform200. For example, network260may generally encompass the various telecommunications networks and service providers that collectively implement the Internet. Network260may also include private networks such as local area networks (LANs) or wide area networks (WANs) as well as public or private wireless networks. For example, both a given client250and web services platform200may be respectively provisioned within enterprises having their own internal networks. In such an embodiment, network260may include the hardware (e.g., modems, routers, switches, load balancers, proxy servers, etc.) and software (e.g., protocol stacks, accounting software, firewall/security software, etc.) necessary to establish a networking link between given client250and the Internet as well as between the Internet and web services platform200. It is noted that in some embodiments, clients250may communicate with web services platform200using a private network rather than the public Internet. For example, clients250may be provisioned within the same enterprise as a database service system (e.g., a system that implements database service210and/or distributed database-optimized storage service220). In such a case, clients250may communicate with platform200entirely through a private network260(e.g., a LAN or WAN that may use Internet-based communication protocols but which is not publicly accessible).

Generally speaking, web services platform200may be configured to implement one or more service endpoints configured to receive and process web services requests, such as requests to access data pages (or records thereof). For example, web services platform200may include hardware and/or software configured to implement a particular endpoint, such that an HTTP-based web services request directed to that endpoint is properly received and processed. In one embodiment, web services platform200may be implemented as a server system configured to receive web services requests from clients250and to forward them to components of a system that implements database service210, distributed database-optimized storage service220and/or another virtual computing service230for processing. In other embodiments, web services platform200may be configured as a number of distinct systems (e.g., in a cluster topology) implementing load balancing and other request management features configured to dynamically manage large-scale web services request processing loads. In various embodiments, web services platform200may be configured to support REST-style or document-based (e.g., SOAP-based) types of web services requests.

In addition to functioning as an addressable endpoint for clients' web services requests, in some embodiments, web services platform200may implement various client management features. For example, platform200may coordinate the metering and accounting of client usage of web services, including storage resources, such as by tracking the identities of requesting clients250, the number and/or frequency of client requests, the size of data tables (or records thereof) stored or retrieved on behalf of clients250, overall storage bandwidth used by clients250, class of storage requested by clients250, or any other measurable client usage parameter. Platform200may, in some embodiments, be configured to distribute a client web services request to a particular database engine head node of its respective database instance. As a simple example, at a time 1, platform200may distribute a read request to database engine head node 1 and at a time 3, platform may distribute a write request to database engine head node 2. Platform200may also implement financial accounting and billing systems, or may maintain a database of usage data that may be queried and processed by external systems for reporting and billing of client usage activity. In certain embodiments, platform200may be configured to collect, monitor and/or aggregate a variety of storage service system operational metrics, such as metrics reflecting the rates and types of requests received from clients250, bandwidth utilized by such requests, system processing latency for such requests, system component utilization (e.g., network bandwidth and/or storage utilization within the storage service system), rates and types of errors resulting from requests, characteristics of stored and requested data pages or records thereof (e.g., size, data type, etc.), or any other suitable metrics. In some embodiments such metrics may be used by system administrators to tune and maintain system components, while in other embodiments such metrics (or relevant portions of such metrics) may be exposed to clients250to enable such clients to monitor their usage of database service210, distributed database-optimized storage service220and/or another virtual computing service230(or the underlying systems that implement those services).

In some embodiments, platform200may also implement user authentication and access control procedures. For example, for a given web services request to access a particular database table, platform200may be configured to ascertain whether the client250associated with the request is authorized to access the particular database table. Platform200may determine such authorization by, for example, evaluating an identity, password or other credential against credentials associated with the particular database table, or evaluating the requested access to the particular database table against an access control list for the particular database table. For example, if a client250does not have sufficient credentials to access the particular database table, platform200may reject the corresponding web services request, for example by returning a response to the requesting client250indicating an error condition. Various access control policies may be stored as records or lists of access control information by database service210, distributed database-optimized storage service220and/or other virtual computing services230.

It is noted that while web services platform200may represent the primary interface through which clients250may access the features of a database system that implements database service210, it need not represent the sole interface to such features. For example, an alternate API that may be distinct from a web services interface may be used to allow clients internal to the enterprise providing the database system to bypass web services platform200. Note that in many of the examples described herein, distributed database-optimized storage service220may be internal to a computing system or an enterprise system that provides database services to clients250, and may not be exposed to external clients (e.g., users or client applications). In such embodiments, the internal “client” (e.g., database service210) may access distributed database-optimized storage service220over a local or private network, shown as the solid line between distributed database-optimized storage service220and database service210(e.g., through an API directly between the systems that implement these services). In such embodiments, the use of distributed database-optimized storage service220in storing database tables on behalf of clients250may be transparent to those clients. In other embodiments, distributed database-optimized storage service220may be exposed to clients250through web services platform200to provide storage of database tables or other information for applications other than those that rely on database service210for database management. This is illustrated inFIG. 2by the dashed line between web services platform200and distributed database-optimized storage service220. In such embodiments, clients of the distributed database-optimized storage service220may access distributed database-optimized storage service220via network260(e.g., over the Internet). In some embodiments, a virtual computing service230may be configured to receive storage services from distributed database-optimized storage service220(e.g., through an API directly between the virtual computing service230and distributed database-optimized storage service220) to store objects used in performing computing services230on behalf of a client250. This is illustrated inFIG. 2by the dashed line between virtual computing service230and distributed database-optimized storage service220. In some cases, the accounting and/or credentialing services of platform200may be unnecessary for internal clients such as administrative clients or between service components within the same enterprise.

Note that in various embodiments, different storage policies may be implemented by database service210and/or distributed database-optimized storage service220. Examples of such storage policies may include a durability policy (e.g., a policy indicating the number of instances of a database table (or data page thereof) that will be stored and the number of different nodes on which they will be stored) and/or a load balancing policy (which may distribute database tables, or data pages thereof, across different nodes, volumes and/or disks in an attempt to equalize request traffic). In addition, different storage policies may be applied to different types of stored items by various one of the services. For example, in some embodiments, distributed database-optimized storage service220may implement a higher durability for redo log records than for data pages.

FIG. 3is a block diagram illustrating various components of a database system that includes a database engine and a separate distributed database storage service, according to one embodiment. In this example, database system300includes a respective database engine head node320for each of several database tables and a distributed database-optimized storage service310(which may or may not be visible to the clients of the database system, shown as database clients350a-350n). As illustrated in this example, one or more of database clients350a-350nmay access a database head node320(e.g., head node320a, head node320b, or head node320c, each of which is a component of a respective database instance) via network360(e.g., these components may be network-addressable and accessible to the database clients350a-350n). However, distributed database-optimized storage service310, which may be employed by the database system to store data pages of one or more database tables (and redo log records and/or other metadata associated therewith) on behalf of database clients350a-350n, and to perform other functions of the database system as described herein, may or may not be network-addressable and accessible to the storage clients350a-350n, in different embodiments. For example, in some embodiments, distributed database-optimized storage service310may perform various storage, access, change logging, recovery, log record manipulation, and/or space management operations in a manner that is invisible to storage clients350a-350n.

As previously noted, each database instance may include a single database engine head node320that receives requests (e.g., a transaction request, etc.) from various client programs (e.g., applications) and/or subscribers (users), then parses them, optimizes them, and develops an execution plan to carry out the associated database operation(s). In the example illustrated inFIG. 3, a query parsing, optimization, and execution component305of database engine head node320amay perform these functions for queries that are received from database client350aand that target the database instance of which database engine head node320ais a component. In some embodiments, query parsing, optimization, and execution component305may return query responses to database client350a, which may include write acknowledgements, requested data pages (or portions thereof), error messages, and or other responses, as appropriate. As illustrated in this example, database engine head node320amay also include a client-side storage service driver325, which may route read requests and/or redo log records (e.g., from writes) to various storage nodes within distributed database-optimized storage service310, receive write acknowledgements from distributed database-optimized storage service310, receive requested data pages from distributed database-optimized storage service310, and/or return data pages, error messages, or other responses to query parsing, optimization, and execution component305(which may, in turn, return them to database client350a).

In this example, database engine head node320aincludes a data page cache335, in which data pages that were recently accessed may be temporarily held. As illustrated inFIG. 3, database engine head node320amay also include a transaction and consistency management component330, which may be responsible for providing transactionality and consistency in the database instance of which database engine head node320ais a component. For example, this component may be responsible for ensuring the Atomicity, Consistency, and Isolation properties of the database instance and the transactions that are directed that the database instance. For example, a database engine head node of the database service may receive a read request to perform a read of a record stored by the database service. Another database engine head node may receive a transaction request to perform a transaction (e.g., write, etc.) to the record. Transaction and consistency management component330of the database engine head node that received the read request may then detect a potential read anomaly (e.g., fuzzy read, read skew, etc.) based on a determination that an indication of time associated with the read is within a threshold value of a second indication of time associated with the transaction. In response to detecting the potential read anomaly, the read may be performed after the transaction specified by the transaction request, regardless of whether the first indication of time is indicative of an earlier point in time than the second indication of time. In some instances, the read may be retried such that a potential read anomaly does not occur for the retry.

As illustrated inFIG. 3, database engine head node320amay also include a transaction log340and an undo log345, which may be employed by transaction and consistency management component330to track the status of various transactions and roll back any locally cached results of transactions that do not commit.

Note that each of the other database engine head nodes320illustrated inFIG. 3(e.g.,320band320c) may include similar components and may perform similar functions for queries and/or other transactions received by one or more of database clients350a-350nand directed to the respective database instances of which it is a component. For example, the disclosed transaction ordering techniques may be implemented in a scenario in which two different database engine head nodes are accessing (e.g., one reading, one writing) the same data within a threshold amount of time, as described herein.

One embodiment of a distributed database-optimized storage system is illustrated by the block diagram inFIG. 4. In this example, a database system400includes a distributed database-optimized storage system410, which communicates with a database engine head node420over interconnect460. As in the example illustrated inFIG. 3, database engine head node420may include a client-side storage service driver425. In this example, distributed database-optimized storage system410includes multiple storage system server nodes (including those shown as430,440, and450), each of which includes storage for data pages and redo logs for the segment(s) it stores, and hardware and/or software configured to perform various segment management functions. For example, each storage system server node may include hardware and/or software configured to perform at least a portion of any or all of the following operations: replication (locally, e.g., within the storage node), coalescing of redo logs to generate data pages, log management (e.g., manipulating log records), crash recovery, and/or space management (e.g., for a segment). Each storage system server node may also have multiple attached storage devices (e.g., SSDs) on which data blocks may be stored on behalf of clients (e.g., users, client applications, and/or database service subscribers).

In the example illustrated inFIG. 4, storage system server node430includes data page(s)433, segment redo log(s)435, segment management functions437, and attached SSDs471-478. Again note that the label “SSD” may or may not refer to a solid-state drive, but may more generally refer to a local block storage volume, regardless of its underlying hardware. Similarly, storage system server node440includes data page(s)443, segment redo log(s)445, segment management functions447, and attached SSDs481-488; and storage system server node450includes data page(s)453, segment redo log(s)455, segment management functions457, and attached SSDs491-498.

In some embodiments, each of the storage system server nodes in the distributed database-optimized storage system may implement a set of processes running on the node server's operating system that manage communication with the database engine head node, e.g., to receive redo logs, send back data pages, etc. In some embodiments, all data blocks written to the distributed database-optimized storage system may be backed up to long-term and/or archival storage (e.g., in a remote key-value durable backup storage system).

FIG. 5is a block diagram illustrating the use of a separate distributed database-optimized storage system in a database system, according to one embodiment. In this example, one or more client processes510may store data to one or more database tables maintained by a database system that includes a database engine520and a distributed database-optimized storage system530. In the example illustrated inFIG. 5, database engine520includes database tier components560and client-side driver540(which serves as the interface between distributed database-optimized storage system530and database tier components560). In some embodiments, database tier components560may perform functions such as those performed by query parsing, optimization and execution component305and transaction and consistency management component330(e.g., transaction ordering) ofFIG. 3, and/or may store data pages, transaction logs and/or undo logs (such as those stored by data page cache335, transaction log340and undo log345ofFIG. 3).

In this example, one or more client processes510may send database query requests515(which may include read and/or write and/or other transaction requests targeting data stored on one or more of the storage nodes535a-535n) to database tier components560, and may receive database query responses517from database tier components560(e.g., responses that include write acknowledgements and/or requested data). Each database query request515that includes a request to write to a data page may be parsed and optimized to generate one or more write record requests541, which may be sent to client-side driver540for subsequent routing to distributed database-optimized storage system530. In this example, client-side driver540may generate one or more redo log records531corresponding to each write record request541, and may send them to specific ones of the storage nodes535of distributed database-optimized storage system530. Distributed database-optimized storage system530may return a corresponding write acknowledgement523for each redo log record531to database engine520(specifically to client-side driver540). Client-side driver540may pass these write acknowledgements to database tier components560(as write responses542), which may then send corresponding responses (e.g., write acknowledgements) to one or more client processes510as one of database query responses517.

In this example, each database query request515that includes a request to read a data page may be parsed and optimized to generate one or more read record requests543, which may be sent to client-side driver540for subsequent routing to distributed database-optimized storage system530. In this example, client-side driver540may send these requests to specific ones of the storage nodes535of distributed database-optimized storage system530, and distributed database-optimized storage system530may return the requested data pages533to database engine520(specifically to client-side driver540). Client-side driver540may send the returned data pages to the database tier components560as return data records544, and database tier components560may then send the data pages to one or more client processes510as database query responses517.

In some embodiments, various error and/or data loss messages534may be sent from distributed database-optimized storage system530to database engine520(specifically to client-side driver540). These messages may be passed from client-side driver540to database tier components560as error and/or loss reporting messages545, and then to one or more client processes510along with (or instead of) a database query response517.

In some embodiments, the APIs531-534of distributed database-optimized storage system530and the APIs541-545of client-side driver540may expose the functionality of the distributed database-optimized storage system530to database engine520as if database engine520were a client of distributed database-optimized storage system530. For example, database engine520(through client-side driver540) may write redo log records or request data pages through these APIs to perform (or facilitate the performance of) various operations of the database system implemented by the combination of database engine520and distributed database-optimized storage system530(e.g., storage, access, change logging, recovery, and/or space management operations). As illustrated inFIG. 5, distributed database-optimized storage system530may store data blocks on storage nodes535a-535n, each of which may have multiple attached SSDs. In some embodiments, distributed database-optimized storage system530may provide high durability for stored data block through the application of various types of redundancy schemes.

Note that in various embodiments, the API calls and responses between database engine520and distributed database-optimized storage system530(e.g., APIs531-534) and/or the API calls and responses between client-side driver540and database tier components560(e.g., APIs541-545) inFIG. 5may be performed over a secure proxy connection (e.g., one managed by a gateway control plane), or may be performed over the public network or, alternatively, over a private channel such as a virtual private network (VPN) connection. These and other APIs to and/or between components of the database systems described herein may be implemented according to different technologies, including, but not limited to, Simple Object Access Protocol (SOAP) technology and Representational state transfer (REST) technology. For example, these APIs may be, but are not necessarily, implemented as SOAP APIs or RESTful APIs. SOAP is a protocol for exchanging information in the context of Web-based services. REST is an architectural style for distributed hypermedia systems. A RESTful API (which may also be referred to as a RESTful web service) is a web service API implemented using HTTP and REST technology. The APIs described herein may in some embodiments be wrapped with client libraries in various languages, including, but not limited to, C, C++, Java, C# and Perl to support integration with database engine520and/or distributed database-optimized storage system530.

As noted above, in some embodiments, the functional components of a database system may be partitioned between those that are performed by the database engine and those that are performed in a separate, distributed, database-optimized storage system. In one specific example, in response to receiving a request from a client process (or a thread thereof) to insert something into a database table (e.g., to update a single data block by adding a record to that data block), one or more components of the database engine head node may perform query parsing, optimization, and execution, and may send each portion of the query to a transaction and consistency management component.

The transaction and consistency management component may ensure that no other client process (or thread thereof) is trying to modify the same row at the same time. For example, the transaction and consistency management component may be responsible for ensuring that this change is performed atomically, consistently, durably, and in an isolated manner in the database. For example, the transaction and consistency management component may work together with the client-side storage service driver of the database engine head node to generate a redo log record to be sent to one of the nodes in the distributed database-optimized storage service and to send it to the distributed database-optimized storage service (along with other redo logs generated in response to other client requests) in an order and/or with timing that ensures the ACID properties are met for this transaction. Upon receiving the redo log record, the corresponding storage node may update the data block, and may update a redo log for the data block (e.g., a record of all changes directed to the data block). In some embodiments, the database engine may be responsible for generating an undo log record for this change, and may also be responsible for generating a redo log record for the undo log both of which may be used locally (in the database tier) for ensuring transactionality. Moreover, in various embodiments, the transaction and consistency management component may be configured to perform transaction ordering. For example, the transaction and consistency management component may be configured to detect a potential read anomaly (e.g., a fuzzy read, read skew, etc.) in a situation where multiple database engine head nodes attempt to perform transactions (e.g., a read and commit) at approximately the same time (e.g., with consistency points within a threshold value of each other). In response to detection of the potential read anomaly, the transaction and consistency management component may be further configured to cause the read to occur after the other transaction even where the read is associated with an earlier time.

Turning now toFIG. 6, in various embodiments, database system300(or some system other than a database service that is usable to read, write, and store data) may be configured to perform transaction ordering. While the method ofFIG. 6may be described as being performed by various components (e.g., nodes) of a distributed database system, such as transaction and consistency management330and/or a client side driver of database engine head nodes320a,320b,320c, etc., the method need not be performed by any specific component in some cases. For instance, in some cases, the method ofFIG. 6may be performed by some other component or computer system, according to some embodiments. Or, in some cases, components of database system300may be combined or exist in a different manner than that shown in the example ofFIG. 3. In various embodiments, the method ofFIG. 6may be performed by one or more nodes of a distributed database system, one of which is shown as the computer system ofFIG. 8. The method ofFIG. 6is shown as one example implementation of a method for transaction ordering. In other implementations, the method ofFIG. 6may include additional or fewer blocks than are shown.

At610, a read request to perform a read of a record (e.g., stored by the database service or some other service) and a transaction request to perform a transaction to the record may be received, for example, from one or more clients (e.g., of the database service or other service). In one embodiment, the read request may be received as a SELECT statement or some other request. The read request may also be referred to as a request for a snapshot point in time that is usable to view a snapshot of the record. The transaction request may be an UPDATE, INSERT, or some other transaction (e.g., write transaction) usable to modify a record (e.g., of the database) and that may be committed. In various embodiments, the transaction request and read request may be received by different nodes (e.g., primary nodes that have the ability to read/write and/or a primary node and a read replica that only has the ability, at that time, to read a record) that may have simultaneous access to the records being stored. For example, in one embodiment, web services platform200ofFIG. 2may receive the read request and the transaction request and route them to different nodes of different database instances. Note that although the example above atFIGS. 1-5described separate database and storage tiers, in other examples, the storage tier may not be separate from a database instance. And, in other examples, the system may not be a database service but may instead be another system that is capable of performing reads and writes of stored data. Further note that two nodes that are writers may have locking between them. A node that is a reader and a node that is a writer may not have locking between them, however, to permit concurrency.

In one embodiment, the various nodes may maintain per-node clocks that may be used for transaction ordering. The clocks may be synchronized across the nodes and may have an accuracy of +/−δ within each other. Because the clocks may have non-zero accuracy in a multi-node system, approximately simultaneous events can occur and may be difficult to accurately order (causality) and may be difficult to preserve a particular isolation level. For example, a read consistent isolation level may include the following properties: at the start time of a statement, there is a point in time at which anything committed from another node is seen at that point in time, changes from another node that have not been committed are not seen at that point in time, and changes from the node itself can be seen whether committed or not. Given two times, A and B, the following three scenarios may occur: A<B (A happened before B); A>B: A happened after B; and A≈B (A happened approximately simultaneously with B, such that A and B are within the accuracy window of δ).

In some embodiments, the times kept by the clocks may be a timestamp (e.g., year 2012, day 15, 20:00.35 GMT), and in other embodiments, the times may be a monotonically increasing value indicative of time, such as a log sequence number (“LSN”). The value may increase upon occurrence of a communication across nodes of the system. In the LSN example, because the values are monotonically increasing, LSN100may be indicative of an earlier point in time than an LSN105. Note that in the LSN time space, each numerical value need not be used. Thus, LSNs100and105may be the two closest assigned LSNs in one example. In another example, each of LSNs100-105may be used.

As shown at620, first and second indications of time may be associated with the read and the transaction, respectively. For example, in some embodiments, upon receiving a request (e.g., transaction, read, etc.), the node receiving the request may assign one or more times to the transaction based on that head node's respective clock. For example, a head node may receive a read request at LSN100and may assign a consistency point in time (snapshot time) Ts of 100. Ts may represent when the snapshot time was created. As another example, a head node (e.g., a different head node) may receive a request to update a table at LSN101. That node may update the table at LSN102, and then commit the update at LSN103. In such an example, the node may assign a commit time Tc of 103 that represents when the transaction was committed. Note that other times associated with the transaction may also be assigned. For example, Tw may be another time, in addition to Tc, which may be associated with a write. Tw may represent the time immediately after the last page to be modified was unlatched (e.g., release/unlock the page) and may be assigned by the head node that received the transaction request. As another example, Tr may be another time, in addition to Ts, which is associated with a read. Tr may represent the time immediately after the first data page read was latched and may be assigned by the head node that received the read request.

As illustrated at630, a potential read anomaly may be detected. In one embodiment, the head node that received the read request (and executes the read) may perform the detection at block630. In some embodiments, such detection may be based on a determination that the first indication of time (e.g., Ts and/or Tr) is within a threshold value (e.g., the accuracy window δ) of the second indication of time (e.g., Tc and/or Tw). Various potential read anomalies may occur. For example, a fuzzy read can happen when an update and (re)read happen nearly simultaneously and result in different values read for the same record. In the example of Table 1 using a δ of 5, the read works properly as it reads the proper value by treating the commit as having happened before the read's consistency point. The example of Table 1 is graphically illustrated inFIG. 7A.

TABLE 1Node 1Node 2101Begin Transaction100Create snapshot (Ts= 100)102Update X = 10101103Commit (Tc= 103)102104103Read X (10) [100 ≈ 103]
A fuzzy read is shown in the example of Table 2 and illustrated inFIG. 7B, also using a δ of 5. In the fuzzy read, the read transaction reads a value (1) at LSN 101 and then sees a different value (10) on a second read at LSN 104 of the same record. As described herein, the disclosed techniques may detect the potential fuzzy read of Table 2 and adjust the read so that the fuzzy read may not actually occur.

Note that the fuzzy read of Table 2 may not occur if the operations are serialized (e.g., on the client(s)) because the updates will be made before the row is read for the first time.

Another anomalous read is a read skew, which is a situation where inconsistent data (e.g., of multiple different records) is read. Consider the example of Table 3 (illustrated atFIG. 7C), also with δ of 5. In the example of Table 3 andFIG. 7C, the data table has the invariant that X=2Y with initial values of X=1 and Y=2. As shown, the initial value of 1 is read for X at LSN 101 but the updated value for Y is read at LSN 104 as 20, which is inconsistent with X=2Y.

In some embodiments, a potential read anomaly may be detected where a commit time Tc is within the accuracy window (δ) of the consistency point of the read Ts. A potential read anomaly is used herein to indicate that a possibility exists that a read anomaly may occur but note that a potential read anomaly does not necessarily mean that a read anomaly will definitely occur. Accordingly, if a possibility of a read anomaly exists, the system may detect it and attempt to avoid the potential read anomaly, as described below at block640.

As noted above, in some embodiments, times other than Tc and Ts may likewise be associated with a read and/or other transaction. For example, in an embodiment using Tw, if Tc>Ts, then the modifications made by the transaction are not seen by the read and an anomalous read may not occur. If Tc<Ts, then the modifications made by the transaction are seen by the read. If Tc≈Ts and Tw<Ts, then the modifications made by the transaction were made before the read so there is not a potential read anomaly. Changes made by the transaction are seen by the read. Otherwise, if Tc≈Ts and Tw≈Ts, a potential read anomaly exists.

In some embodiments, Tr may also be used for detecting a potential read anomaly. In such embodiments, if Tc>Ts, then the modifications made by the transaction are not seen by the read and an anomalous read may not occur. If Tc<Ts, then the modifications made by the transaction are seen by the read. If Tc≈Ts and Tw<Tr, then the modifications made by the transaction were made before the read so there is not a potential read anomaly. Otherwise, if Tc≈Ts and Tw≈Tr, a potential read anomaly exists and may be detected at block630.

Note that, in some embodiments, read skew and fuzzy reads may only happen after the first page latch. Accordingly, statements that retrieve single records may not encounter such anomalies. Thus, in some embodiments, the detection logic of block630may only be performed for multiple record retrievals (whether multiple retrievals of the same record or retrievals of multiple different records).

As shown at640, in response to said detecting the potential read anomaly, the node that received the read request may cause the read, specified by the read request, to be performed after the transaction specified by the transaction request, regardless of whether the first indication of time is indicative of an earlier point in time than the second indication of time.

In some embodiments, causing the read to be performed after the transaction may include the node that received the read request retrying the read such that a retry indication of time associated with retrying the read is indicative of a time later than the first indication of time. For example, if a potentially fuzzy read or read skew is detected, the read statement may be retried by preserving Ts but resetting Tr (e.g., pushing Tr forward in time). By maintaining Ts on retry, forward progress may be achieved because, as Tr is advanced, the transaction and read may eventually fall into one of the known cases of the comparison logic (e.g., a situation in which a potential read anomaly will not occur).

Note that, in one embodiment, for the retry, the detection logic of block630may be applied again with the retry time (updated Tr) replacing the previous Tr. Accordingly, if the retry is successful, the detection logic will determine that no read anomaly occurred for the retried read. For example, using the updated Tr may cause the detection logic to determine that the retry falls within one of the categories in which the anomalous read is not possible (e.g., Tc≈Ts and Tw<Tr) and retry will take place without an anomalous read. On the other hand, another potential anomalous read may take place such that upon another retry, another retry time will be pushed further forward in time. Application of the detection logic, the determination that a potentially anomalous read exists, and retry of the statement may occur any number of times until a retry is successful. Or, in some embodiments, the node may retry the statement a certain maximum number of times (e.g., 2, 3, 10, etc.) before returning an error message with the actual read value with the error message indicating that the read may not be accurate.

In one embodiment, the threshold value may be modified. For example, based on the frequency of retry for transactions that have already occurred in the system, the threshold value may be modified. As an example, if retries are occurring frequently, then the threshold value may be reduced to a less conservative level. Similarly, the threshold value may be increased.

In some embodiments, blocks620,630, and640may occur for read request that include multiple record retrievals, whether multiple reads of the same record or reads of multiple different records. Thus, in such embodiments, the check for a read anomaly may take place for multiple record retrievals but not for single record retrieval. Accordingly, the first read may be a free read because a read skew or fuzzy read may not be possible if only a single read is being performed (as the definitions of those read anomalies include a second read that is inconsistent with the first read). Therefore, in some embodiments, the system may not always apply the method ofFIG. 6when handing a read request for a single record retrieval and a transaction request that are within the accuracy window (threshold value) of each other.

In some embodiments, the node that received the read request may be aware that another node received a write request and is updating the record. For example, the system may include an underlying substructure that ensures other nodes will be aware of a change to the data. Example underlying substructures include cache fusion (e.g., at the web services platform200level relative to respective data page caches335or some other caches) or shared disks. In one embodiment, a coherent cache may sit on top of the common storage (e.g., the storage tier). The coherent cache may ensure that if a node wrote something, another node will see it. In one embodiment, various indications of time may be stored in a transaction table. For example, Tw may be stored with a transaction commit time as of the time of commit and each time a value is written, a transaction identifier may be generated. The transaction identifier may indicate whether a given transaction is active or committed. If the transaction is active for a given record, a node performing a read of that record may generate a previous value (e.g., roll back, undo, etc.) for that record.

The methods described herein may in various embodiments be implemented by any combination of hardware and software. For example, in one embodiment, the methods may be implemented by a computer system (e.g., a computer system as inFIG. 8) that includes one or more processors executing program instructions stored on a computer-readable storage medium coupled to the processors. The program instructions may be configured to implement the functionality described herein (e.g., the functionality of various servers and other components that implement the services/systems and/or storage services/systems described herein).

The disclosed transaction ordering techniques may provide for a strong and understandable isolation level to customers. The techniques may improve scalability of the system because snapshot (read) creation may be fast and not require any network communication. Moreover, workloads where transactions do not overlap can also scale out well. Singleton row retrieval may be fast as those reads may be free without having to perform the read anomaly detection logic. In embodiments using a refined accuracy window (e.g., by factoring in Tr and/or Tw in addition to Tc and Ts), the likelihood of statement retries may be decreased.

FIG. 8is a block diagram illustrating a computer system configured to implement at least a portion of the systems described herein, according to various embodiments. For example, computer system800may be configured to implement a node of a (e.g., of a database tier or comparable system), or one of a plurality of storage nodes that stores records and associated metadata on behalf of clients, in different embodiments. Computer system800may be any of various types of devices, including, but not limited to, a personal computer system, desktop computer, laptop or notebook computer, mainframe computer system, handheld computer, workstation, network computer, a consumer device, application server, storage device, telephone, mobile telephone, or in general any type of computing device.

Computer system800includes one or more processors810(any of which may include multiple cores, which may be single or multi-threaded) coupled to a system memory820via an input/output (I/O) interface830. Computer system800further includes a network interface840coupled to I/O interface830. In various embodiments, computer system800may be a uniprocessor system including one processor810, or a multiprocessor system including several processors810(e.g., two, four, eight, or another suitable number). Processors810may be any suitable processors capable of executing instructions. For example, in various embodiments, processors810may be general-purpose or embedded processors implementing any of a variety of instruction set architectures (ISAs), such as the x86, PowerPC, SPARC, or MIPS ISAs, or any other suitable ISA. In multiprocessor systems, each of processors810may commonly, but not necessarily, implement the same ISA. The computer system800also includes one or more network communication devices (e.g., network interface840) for communicating with other systems and/or components over a communications network (e.g. Internet, LAN, etc.). For example, a client application executing on system800may use network interface840to communicate with a server application executing on a single server or on a cluster of servers that implement one or more of the components of the database systems described herein. In another example, an instance of a server application executing on computer system800may use network interface840to communicate with other instances of the server application (or another server application) that may be implemented on other computer systems (e.g., computer systems890).

In the illustrated embodiment, computer system800also includes one or more persistent storage devices860and/or one or more I/O devices880. In various embodiments, persistent storage devices860may correspond to disk drives, tape drives, solid state memory, other mass storage devices, or any other persistent storage device. Computer system800(or a distributed application or operating system operating thereon) may store instructions and/or data in persistent storage devices860, as desired, and may retrieve the stored instruction and/or data as needed. For example, in some embodiments, computer system800may host a storage system server node, and persistent storage860may include the SSDs attached to that server node.

Computer system800includes one or more system memories820that are configured to store instructions and data accessible by processor(s)810. In various embodiments, system memories820may be implemented using any suitable memory technology, (e.g., one or more of cache, static random access memory (SRAM), DRAM, RDRAM, EDO RAM, DDR 10 RAM, synchronous dynamic RAM (SDRAM), Rambus RAM, EEPROM, non-volatile/Flash-type memory, or any other type of memory). System memory820may contain program instructions825that are executable by processor(s)810to implement the methods and techniques described herein. In various embodiments, program instructions825may be encoded in platform native binary, any interpreted language such as Java™ byte-code, or in any other language such as C/C++, Java™, etc., or in any combination thereof. For example, in the illustrated embodiment, program instructions825include program instructions executable to implement the functionality of a database engine head node of a database tier, or one of a plurality of storage nodes of a separate distributed database-optimized storage system that stores database tables and associated metadata on behalf of clients of the database tier, in different embodiments. In some embodiments, program instructions825may implement multiple separate clients, server nodes, and/or other components.

In some embodiments, system memory820may include data store845, which may be configured as described herein. For example, the information described herein as being stored by the database tier (e.g., on a database engine head node), such as a transaction log, an undo log, cached page data, or other information used in performing the functions of the database tiers described herein may be stored in data store845or in another portion of system memory820on one or more nodes, in persistent storage860, and/or on one or more remote storage devices870, at different times and in various embodiments. Similarly, the information described herein as being stored by the storage tier (e.g., redo log records, coalesced data pages, and/or other information used in performing the functions of the distributed storage systems described herein) may be stored in data store845or in another portion of system memory820on one or more nodes, in persistent storage860, and/or on one or more remote storage devices870, at different times and in various embodiments. In general, system memory820(e.g., data store845within system memory820), persistent storage860, and/or remote storage870may store data blocks, replicas of data blocks, metadata associated with data blocks and/or their state, database configuration information, and/or any other information usable in implementing the methods and techniques described herein.

In one embodiment, I/O interface830may be configured to coordinate I/O traffic between processor810, system memory820and any peripheral devices in the system, including through network interface840or other peripheral interfaces. In some embodiments, I/O interface830may perform any necessary protocol, timing or other data transformations to convert data signals from one component (e.g., system memory820) into a format suitable for use by another component (e.g., processor810). In some embodiments, I/O interface830may include support for devices attached through various types of peripheral buses, such as a variant of the Peripheral Component Interconnect (PCI) bus standard or the Universal Serial Bus (USB) standard, for example. In some embodiments, the function of I/O interface830may be split into two or more separate components, such as a north bridge and a south bridge, for example. Also, in some embodiments, some or all of the functionality of I/O interface830, such as an interface to system memory820, may be incorporated directly into processor810.

Network interface840may be configured to allow data to be exchanged between computer system800and other devices attached to a network, such as other computer systems890(which may implement one or more storage system server nodes, database engine head nodes, and/or clients of the database systems described herein), for example. In addition, network interface840may be configured to allow communication between computer system800and various I/O devices850and/or remote storage870. Input/output devices850may, in some embodiments, include one or more display terminals, keyboards, keypads, touchpads, scanning devices, voice or optical recognition devices, or any other devices suitable for entering or retrieving data by one or more computer systems800. Multiple input/output devices850may be present in computer system800or may be distributed on various nodes of a distributed system that includes computer system800. In some embodiments, similar input/output devices may be separate from computer system800and may interact with one or more nodes of a distributed system that includes computer system800through a wired or wireless connection, such as over network interface840. Network interface840may commonly support one or more wireless networking protocols (e.g., Wi-Fi/IEEE 802.11, or another wireless networking standard). However, in various embodiments, network interface840may support communication via any suitable wired or wireless general data networks, such as other types of Ethernet networks, for example. Additionally, network interface840may support communication via telecommunications/telephony networks such as analog voice networks or digital fiber communications networks, via storage area networks such as Fibre Channel SANs, or via any other suitable type of network and/or protocol. In various embodiments, computer system800may include more, fewer, or different components than those illustrated inFIG. 8(e.g., displays, video cards, audio cards, peripheral devices, other network interfaces such as an ATM interface, an Ethernet interface, a Frame Relay interface, etc.)

It is noted that any of the distributed system embodiments described herein, or any of their components, may be implemented as one or more web services. For example, a database engine head node within the database tier of a database system may present database services and/or other types of data storage services that employ the distributed storage systems described herein to clients as web services. In some embodiments, a web service may be implemented by a software and/or hardware system designed to support interoperable machine-to-machine interaction over a network. A web service may have an interface described in a machine-processable format, such as the Web Services Description Language (WSDL). Other systems may interact with the web service in a manner prescribed by the description of the web service's interface. For example, the web service may define various operations that other systems may invoke, and may define a particular application programming interface (API) to which other systems may be expected to conform when requesting the various operations.

In various embodiments, a web service may be requested or invoked through the use of a message that includes parameters and/or data associated with the web services request. Such a message may be formatted according to a particular markup language such as Extensible Markup Language (XML), and/or may be encapsulated using a protocol such as Simple Object Access Protocol (SOAP). To perform a web services request, a web services client may assemble a message including the request and convey the message to an addressable endpoint (e.g., a Uniform Resource Locator (URL)) corresponding to the web service, using an Internet-based application layer transfer protocol such as Hypertext Transfer Protocol (HTTP).

The various methods as illustrated in the figures and described herein represent example embodiments of methods. The methods may be implemented manually, in software, in hardware, or in a combination thereof. The order of any method may be changed, and various elements may be added, reordered, combined, omitted, modified, etc.