cortex VS pgx

Compare cortex vs pgx and see what are their differences.

cortex

A horizontally scalable, highly available, multi-tenant, long term Prometheus. (by cortexproject)

pgx

PostgreSQL driver and toolkit for Go (by jackc)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
cortex pgx
17 71
5,352 9,488
0.3% -
9.5 9.1
about 5 hours ago 5 days ago
Go Go
Apache License 2.0 MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

cortex

Posts with mentions or reviews of cortex. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-20.
  • Self hosted log paraer
    4 projects | /r/selfhosted | 20 Jun 2023
    now if its more metric data you are using and want to do APM, prometheus is your man https://prometheus.io/, want to make prometheus your full time job? deploy cortex https://cortexmetrics.io/, honorable mention in the metrics space, Zabbix, https://www.zabbix.com/ I've seen use cases of zabbix going way beyond its intended use its a fantastic tool
  • Is anyone frustrated with anything about Prometheus?
    5 projects | /r/PrometheusMonitoring | 18 Jun 2023
    Yes, but also no. The Prometheus ecosystem already has two FOSS time-series databases that are complementary to Prometheus itself. Thanos and Mimir. Not to mention M3db, developed at Uber, and Cortex, then ancestor of Mimir. There's a bunch of others I won't mention as it would take too long.
  • Centralized solution for Prometheus?
    4 projects | /r/PrometheusMonitoring | 13 Feb 2023
    You can use the Remote write feature to send to a centralized location. It would have to be scalable like Cortex https://cortexmetrics.io/
  • Where to store high-cardinality metrics?
    4 projects | /r/sre | 7 Feb 2023
    Cortex is not really good for high-cardinality metrics (if you are talking about https://github.com/cortexproject/cortex)
  • Building a distributed lab with an observability stack
    3 projects | /r/homelab | 7 Aug 2022
    For a homelab I think prometheus + grafana is easy to get started and scales well. There are lots of ways to set up the architecture. Prometheus can write to a directory on a filesystem, it can be set to write to a remote server, and there are other projects to integrate object storage (s3, minio, etc) or influxdb for long term storage and downsampling.
  • Prometheus federation or Thanos?
    6 projects | /r/PrometheusMonitoring | 21 Jun 2022
    Cortex (it is renamed to Mimir recently).
  • Building my first Monitoring stack - Security concerns
    5 projects | /r/PrometheusMonitoring | 30 Apr 2022
  • Grafana Mimir – 1B active series TSDB
    12 projects | news.ycombinator.com | 30 Mar 2022
    Disclosure: I work for AWS, but I don't work on the Amazon Managed Service for Prometheus. I have my own very long held opinions about Free and Open Source software, and I am only speaking for myself.

    To me, the AGPLv3 license isn't about forcing software users to "give changes back" to a project. It is about giving the permissions to users of software that are necessary for Software Freedom [1] when they access a program over a network. In practice, that means that changes often flow "upstream" to copyleft licensed programs one way or another. But it was never about obligating changes to be "given back" to upstream. In my personal opinion, you should be "free to fork" Free and Open Source Software (FOSS). Indeed, the Grafana folks seem to have decided to do that with Grafana Mimir.

    Personally, I hope that they accept contributions under the AGPLv3 license, and hold themselves to the same obligations that others are held to with regard to providing corresponding source code of derivative works when it is made available to users over a network. In my personal opinion, too often companies use a contributor agreement that excuses them from those obligations, and also allows them to sell the software to others under licenses that do not carry copyleft obligations. See [2] for a blog post that goes into some detail about this.

    If you look at the Coretex project MAINTAINERS file [3], you will see that there are two folks listed that currently work at AWS, but no other company other than Grafana Labs today. I would love to see more diversity in maintainers for a project like this, as I think too many maintainers from any one company isn't the best for long term project sustainability.

    I think if you look at the Cortex Community Meeting minutes [4], you can see that AWS folks are regularly "showing up" in healthy numbers, and working collaboratively with anyone who accepts the open invitation to participate. There have been some pretty big improvements to Coretex that have merged lately, like some of the work on parallel compaction [5, 6].

    TL;DR, I think it is easy to jump to some conclusions about how things are going in a FOSS project that don't hold water if you do some cursory exploration. I think best way to know what's going on in a project is to get involved!

    --

    [1] the rights needed to: run the program for any purpose; to study how the program works, and modify it; to redistribute copies; to distribute copies of modified versions to others

    [2] https://meshedinsights.com/2021/06/14/legally-ignoring-the-l...

    [3] https://github.com/cortexproject/cortex/blob/master/MAINTAIN...

    [4] https://docs.google.com/document/d/1shtXSAqp3t7fiC-9uZcKkq3m...

    [5] https://aws.amazon.com/blogs/opensource/scaling-cortex-with-...

    [6] https://github.com/cortexproject/cortex/pull/4624

  • Ask HN: How to built a HIGHLY scalable API monitoring tool?
    4 projects | news.ycombinator.com | 16 Dec 2021
  • The unbearable fussiness of the smart home
    8 projects | news.ycombinator.com | 24 Nov 2021
    > [...] that feed into a prometheus -> cortex store, so I can then map them on Grafana.

    I had to Google because I've never heard of any of those. Did I find the right ones?

    https://prometheus.io/

    https://cortexmetrics.io/

    https://grafana.com/

    Mine is much more primitive. My indoor temperature monitor is an ESP8266 that uploads the temperature to a simple PHP page that saves it in an sqlite DB. A cron job runs a Perl script every few minutes that extract the data for the last hour, 3 hours, 12 hours, 48 hours, and since the beginning of time and uses gnuplot to produce PNG graphs. There's a static page on my server that displays those graphs.

    My outdoor temperature monitor uses a cheap AcuRite 433 MHz indoor/outdoor thermometer I bought. I have an RPi with an RTL-SDR attached spying on the communications between the AcuRite sensor outside and the AcuRite display inside using rtl_433. A script looks at the rtl_433 and finds the AcuRite sensor data and puts it in an sqlite DB. I haven't yet gotten around to making something to graph it.

    The nice thing about that approach is that it was also easy to add support for other 433 MHz wireless sensors near me, such as the AcuRite fridge/freezer thermometer I have. I can also see a few assorted sensors of neighbors (temperature, humidity, soil moisture, tire pressure, wind speed, wind direction, rain, and a few other random things). If I wanted to it would be easy to add them to the DB.

    When I made a wireless tipping range gauge recently. I used a 433 MHz transmitter module [1] and added a decoder [2] to rtl_433 that understands my data stream format. That gets my data into the rtl_433 output. No need to futz around with 433 MHz receiver modules which appear to be a pain in the ass [3]. An ATTiny85 counts the tips and runs the transmitter. The ATTiny85, the transmitter module, a battery holder, an RJ11 socket because the rain gauge has an RJ11 connector, a board to put those things on [4], and a small waterproof case is pretty much the complete parts list.

    I think I'm going to standardize on this general approach. For things that do not have WiFi and only need to report data 433 MHz modules and custom decoders fro rtl_433 on the RPi. For things that do have WiFi, such as any future ESP projects I do, they will just use WiFi to talk to the RPi. If anything needs to get sent outside of my LAN the RPi will handle it.

    The RPi is also currently controlling a space heater in my living room, getting connection data from my cable modem periodically and recording that in an sqlite DB, and serving a simple web page that lets me quickly change inputs and volume on my Denon receiver and so I'm already pretty much committed to keeping it running all the time.

    [1] https://www.sparkfun.com/products/10534

    [2] Decoders can be specified in a simple text file. Here's the one for my rain guage as an example:

      decoder {

pgx

Posts with mentions or reviews of pgx. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-22.
  • Setting up a Database Driver, Repository and Implementation of a transaction function for your Go App
    2 projects | dev.to | 22 Apr 2024
    Sometimes, backend developers tend to opt for an ORM library because it provides an abstraction between your app and the database and thus there is little or no need to write raw queries and migrations which is nice. However, if you want to get better at writing queries (SQL for example), you need to learn how to build your repositories without an ORM. To open a database handle, you can either do it directly from the database driver or do it from database/sql with the driver passed into it. I will be opening the connection with database/sql together with pgx which is a driver and toolkit for PostgreSQL. Walk with me.
  • The DDD Hamburger for Go
    2 projects | dev.to | 6 Jan 2024
    The infrastructure layer contains the concrete implementation of the repository domain interface ActivityRepository in the struct DbActivityRepository. This repository implementation uses the Postgres driver pgx and plain SQL to store the activity in the database. It uses the database transaction from the context, since the transaction was initiated by the application service.
  • Building RESTful API with Hexagonal Architecture in Go
    21 projects | dev.to | 27 Sep 2023
    For building the RESTful Point of Sale service API, I've considered and selected a combination of technologies that would work seamlessly together. For handling HTTP requests and responses, using the Gin HTTP web framework would make sense because I think it seems complete and popular among Go community too. To ensure data integrity and persistence, I'm using PostgreSQL database with pgx as the database driver, the reason I choose PostgreSQL because it is the most popular relational database to use in production and offers efficient Go integration. I'm also implementing caching using Redis with go-redis client library, which provides powerful in-memory data storage capabilities.
  • Working with postgres in GO.
    2 projects | /r/golang | 3 Jul 2023
    If you are willing to commit to working only with Postgres, I highly recommend pgx. Be sure you get the latest version github.com/jackc/pgx/v5. This gives you the full power of interacting with Postgres without going through an intermediate lowest-common-denominator library.
  • How to Use Iris and PostgreSQL for Web Development
    6 projects | dev.to | 2 Jul 2023
    It uses pg package and pgx driver under the hood.
  • Could I get a code review?
    11 projects | /r/golang | 1 Jun 2023
    Starting off, is there any reason you're calling out to the CLI, instead of just using a Postgres driver like pgx? Shelling out to the command line should always be a last resort where possible as a software engineer.
  • Why elixir over Golang
    10 projects | /r/elixir | 29 May 2023
    For maintaining state I use PostgreSQL. Driver: https://github.com/jackc/pgx (I use the pgxpools) Along with Sqlc for generating database models and allowing me to focus on just building queries in DBeaver. https://sqlc.dev/
  • Make psql display settings on login
    1 project | /r/PostgreSQL | 24 May 2023
    An example of what I'm looking for can be found here https://github.com/jackc/pgx/wiki/Getting-started-with-pgx-through-database-sql/c9f798b4d9a500fcf93931df2464af969d68f516
  • Zig now has built-in HTTP server and client in std
    3 projects | news.ycombinator.com | 18 May 2023
    Except pgx recommends using their native interface, not database/sql, for performance and extra features [0], so it's not that simple in practice.

    [0]: https://github.com/jackc/pgx#choosing-between-the-pgx-and-da...

  • Go Roadmap
    2 projects | /r/golang | 5 May 2023
    pgx is “PostgreSQL driver and toolkit for Go”. Take a look at https://github.com/jackc/pgx

What are some alternatives?

When comparing cortex and pgx you can also consider the following projects:

thanos - Highly available Prometheus setup with long term storage capabilities. A CNCF Incubating project.

sqlx - general purpose extensions to golang's database/sql

mimir - Grafana Mimir provides horizontally scalable, highly available, multi-tenant, long-term storage for Prometheus.

GORM - The fantastic ORM library for Golang, aims to be developer friendly

loki - Like Prometheus, but for logs.

pq - Pure Go Postgres driver for database/sql

VictoriaMetrics - VictoriaMetrics: fast, cost-effective monitoring solution and time series database

gomock - GoMock is a mocking framework for the Go programming language.

TimescaleDB - An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension.

go-sql-driver/mysql - Go MySQL Driver is a MySQL driver for Go's (golang) database/sql package

Ory Kratos - Next-gen identity server replacing your Auth0, Okta, Firebase with hardened security and PassKeys, SMS, OIDC, Social Sign In, MFA, FIDO, TOTP and OTP, WebAuthn, passwordless and much more. Golang, headless, API-first. Available as a worry-free SaaS with the fairest pricing on the market!

sqlc - Generate type-safe code from SQL