Distributed SQL Tricks and Tips – Jan 10, 2019

Dorian Hoxha

Welcome to this week’s community update where we recap a few interesting questions that have popped up in the last week or so on the YugabyteDB Slack channel, Forum, GitHub or Stackoverflow. We’ll also review upcoming events, new blogs and documentation.

What’s YugabyteDB? It is an open source, high-performance distributed SQL database built on a scalable and fault-tolerant design inspired by Google Spanner. Yugabyte’s SQL API (YSQL) is PostgreSQL wire compatible.

How do I connect to YugabyteDB from outside a Kubernetes cluster?

By default, the YugabyteDB Helm will expose only the master UI endpoint using LoadBalancer. If you want to expose YSQL and YCQL services using LoadBalancer for your app to use, you’ll need to use the expose-all.yaml files.

To connect an external program, get the load balancer IP address of the corresponding service. The example below shows how to do this for the YSQL and YCQL services.

$ kubectl get services --all-namespaces

NAMESPACE  NAME         TYPE         CLUSTER-IP   E XTERNAL-IP      PORT(S)               AGE
...
yb-demo    yql-service  LoadBalancer 10.47.249.27  35.225.153.213   9042:30940/TCP        2m
yb-demo    ysql-service LoadBalancer 10.106.28.246 35.225.153.214   5433:30790/TCP        2m
...

For more information on how to deploy and manage YugabyteDB on Kubernetes, check out:

https://docs.yugabyte.com/latest/deploy/kubernetes/helm-chart/#connect-using-external-clients

Does YugabyteDB support user-defined PostgreSQL functions?

Yes, YugabyteDB supports both table functions and functions in general. For more info check out:

https://docs.yugabyte.com/latest/api/ysql/commands/ddl_create_function/#grammar and a three part series on table functions:

How does YugabyteDB generate its performance graphs?

The metrics for each YugabyteDB node are exported in Prometheus format. In our blog post we’re using the same metrics and graphs from Yugabyte Platform which ships with a full-fledged monitoring solution powered by a built-in Prometheus server.

For more information concerning Prometheus and YugabyteDB integration, check out:

https://docs.yugabyte.com/preview/explore/observability/

How can I change the number of tablets after my tables have been created?

Currently, you must specify tablet counts for tables during the CREATE TABLE statement. We’re actively working on automatically splitting tablets and should be available in our upcoming 2.1 release.

You can track the progress of this GitHub issue here:

https://github.com/yugabyte/yugabyte-db/issues/1004

New Documentation, Blogs, Tutorials, and Videos

New Blogs

New Videos

New and Updated Docs

Upcoming Meetups and Conferences

PostgreSQL Meetups

Distributed SQL Webinars

Get Started

Ready to start exploring YugabyteDB features? Getting up and running locally on your laptop is fast. Visit our quickstart page to get started.

What’s Next?

  • Compare YugabyteDB in depth to databases like CockroachDB, Google Cloud Spanner and MongoDB.
  • Get started with YugabyteDB on macOS, Linux, Docker, and Kubernetes.
  • Contact us to learn more about licensing, pricing or to schedule a technical overview.
Dorian Hoxha

Related Posts

Explore Distributed SQL and YugabyteDB in Depth

Discover the future of data management.
Learn at Yugabyte University
Get Started
Browse Yugabyte Docs
Explore docs
PostgreSQL For Cloud Native World
Read for Free