Yugabyte Query Layer (YQL)

AttentionThis page documents an earlier version. Go to the latest (v2.1)version.

The YQL layer implements the server-side of multiple protocols/APIs that Yugabyte supports.Currently, Yugabyte supports Apache Cassandra, Redis, PostgreSQL(beta) wire-protocols natively, and other SQL services are in the roadmap.

Every YB-TServer is configured to support these protocols, on different ports. Port 9042 is thedefault port for CQL wire protocol and 6379 is the default port used for Redis wire protocol.

From the application perspective this is a stateless layer and the clients can connect to any (oneor more) of the YB-TServers on the appropriate port to perform operations against the Yugabytecluster.

The YQL layer running inside each YB-TServer implements some of the API specific aspects of eachsupport API (such as CQL or Redis), but ultimately replicates/stores/retrieves/replicates data usingYugabyte’s common underlying strongly-consistent & distributed core (we refer to as YBase). Some ofthe sub-components in YQL are:

  • A CQL compiler and execution layer - This component includes a “statement cache”, a cache for compiled/execution plan for prepared statements to avoid overheads associated with repeated parsing of CQL statements.
  • A Redis command parser and execution layer
  • Support for language specific builtin operations, data type encodings, etc.

cluster_overview