orczhou.com

  • 首页
  • 云数据库性能/架构与选型
    • 云数据库性能综述
    • AWS RDS架构与选型
    • 阿里云RDS架构与选型
    • 阿里云ARM/x86 RDS对比
    • 华为云鲲鹏/x86 RDS对比
    • AWS Graviton/x86 RDS对比
  • 关于MySQL
    • 读《高性能MySQL》
    • 如何学习MySQL
    • MySQL版本现状与选择
    • MySQL的历史版本
  • 其他
    • 云数据库行业动态
    • 关于生活
    • 归档页面
    • 管理页面
    • 关于orczhou
  • 云数据库技术动态@2024-06-14

    2024-06-14

    标题:达梦公开上市,首日收盘市值达182亿;Oracle云上将支持Oracle Database@Google Cloud

    重要更新

    Oracle Cloud宣布与Google Cloud深度合作:OCI上(Oracle云)支持Oracle Database@Google Cloud,便捷的管理谷歌云上的Oracle数据库、License、并打通Oracle数据库与Google AI服务的通道[1]。

    达梦上市,首日公开交易,发行价为86.96元/股,当日收盘价为240元(对应市值182亿),盘中最高报313元[2]。

    更新详情

    阿里云

    • RDS MySQL Serverless 通用云盘实例支持按量付费和Serverless互转 [4]
    • RDS MySQL Serverless 支持云盘加密 [5]

    GCP(谷歌云)

    • 托管PostgreSQL支持扩展temporal_tables 1.2.2 [10]  托管PostgreSQL正式支持16版本 [17] 
    • 托管SQL Server 现在支持在 Cloud Storage 中存储时间点恢复 (PITR) 事务日志 [25] 

    Oracle云

    • 基础数据库:AMD E5 柔性形状(Base Database: AMD E5 flex shape)[26]

    火山云(字节)

    • RDS PostgreSQL支持了单独重启只读节点[30]
    • 数据库工作台支持了PostgreSQL[31];支持MySQL空间分析[32]

    AWS(亚马逊云)

    • Amazon RDS is ending support for the db.m4, db.r4, and db.t2 DB instance classes[28]

    腾讯云

    • 云数据库 PostgreSQL 发布 database 级别的原实例回档功能。[29]

    参考链接

    • [1] https://mp.weixin.qq.com/s/x14dd0pDwxl0b0-0Tx6lhg
    • [2] https://mp.weixin.qq.com/s/IEvpLS-JPcK8QINGhrj7QQ
    • [4] https://help.aliyun.com/zh/rds/apsaradb-rds-for-mysql/rds-mysql-serverless
    • [5] https://help.aliyun.com/zh/rds/apsaradb-rds-for-mysql/configure-the-disk-encryption-feature-for-an-apsaradb-rds-for-mysql-instance
    • [17] https://cloud.google.com/sql/docs/postgres/create-instance
    • [25] https://cloud.google.com/sql/docs/sqlserver/backup-recovery/restore#tips-pitr
    • [26] https://docs.public.oneportal.content.oci.oraclecloud.com/iaas/releasenotes/changes/fac96cd1-1ebb-4ab0-91c2-56b98b591127/
    • [27] https://docs.public.oneportal.content.oci.oraclecloud.com/iaas/releasenotes/changes/d85978bc-0507-4f24-9867-6169ed82dab2/
    • [30] https://www.volcengine.com/docs/6438/80233
    • [31] https://www.volcengine.com/docs/6438/162909
    • [32] https://www.volcengine.com/docs/6956/812902
  • 云数据库技术动态@2024-06-07

    2024-06-07

    标题:Databricks超10亿美元收购Tabular;Zilliz 推出 Milvus Lite ; 腾讯云支持Redis 7.0

    重要更新

    Databricks超10亿美元收购Tabular,Databricks将增强 Delta Lake 和 Iceberg 社区合作,以实现 Lakehouse 底层格式的开放与兼容[1] [2]。

    Zilliz 推出 Milvus Lite 轻量级向量数据库,支持本地运行;Milvus Lite 复用了 Milvus 向量索引和查询解析的核心组件,同时移除了分布式系统高扩展性设计的组件,旨在帮助 AI 开发人员更快捷地搭建原型[3]。

    更新详情

    腾讯云

    • 云数据库 PostgreSQL 发布 database 级别的原实例回档功能。[31]
    • 云数据库 Redis 7.0版本支持正式发布[32]

    Oracle云

    • GoldenGate 增加了对 Db2 for z/OS [25]

    AWS(亚马逊云)

    • Amazon RDS不再支持db.m4, db.r4, and db.t2 类型的实例 [28]

    Azure(微软云)

    • Azure Cosmos DB for MongoDB(vCore版本) 现支持 Mongo Ver 7.0 [11]
    • Azure Database for PostgreSQL 支持长期备份保留 [12]

    GCP(谷歌云)

    • Cloud SQL for SQL Server 现在支持在 Cloud Storage 中存储时间点恢复 (PITR) 事务日志 [17] 
    • 部分 MySQL/PostgreSQL版本社区生命周期结束 (EOL) ,将Cloud SQL for MySQL/PostgreSQL将从2025 年 2 月 1 日开始提供扩展支持[18] [19] [20] [21] 

    参考链接

    • [1] https://www.reuters.com/markets/deals/databricks-buy-data-management-firm-tabular-over-1-bln-2024-06-04/
    • [2] https://www.databricks.com/company/newsroom/press-releases/databricks-agrees-acquire-tabular-company-founded-original-creators
    • [3] https://mp.weixin.qq.com/s/RaH94QQSNxTVB3U5VxQp2A
    • [11] https://azure.microsoft.com/en-us/updates/general-availability-vcorebased-azure-cosmos-db-for-mongodb-now-supports-mongo-ver-70/
    • [12] https://azure.microsoft.com/en-us/updates/general-availability-longterm-backup-retention-for-azure-database-for-postgresql-flexible-server/
    • [17] https://cloud.google.com/sql/docs/sqlserver/backup-recovery/restore#tips-pitr
    • [18] https://cloud.google.com/sql/docs/mysql/extended-support
    • [19] https://cloud.google.com/sql/docs/mysql/db-versions
    • [20] https://cloud.google.com/sql/docs/postgres/extended-support
    • [21] https://cloud.google.com/sql/docs/postgres/db-versions
    • [25] https://docs.public.oneportal.content.oci.oraclecloud.com/iaas/releasenotes/changes/d85978bc-0507-4f24-9867-6169ed82dab2/
    • [28] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.Types
    • [31] https://cloud.tencent.com/document/product/409/106675
    • [32] https://cloud.tencent.com/document/product/239/79933

  • 云数据库RDS MySQL性能测试与对比@2024年05月

    2024-06-02

    本文是一个系列文章的一部分,该系列较为完整的对各个云厂商的RDS MySQL进行了测试,包括了阿里云、腾讯云、华为云、百度云、AWS、Azure、GCP、Oracle Cloud等,最新的测试:云数据库RDS MySQL的性能。

    在不同的云厂商,购买相同规格的MySQL实例(如4vCPU-16GB),获得的性能相同吗?

    为了回答上面的疑问,于是就开启了我的数据库性能测试之旅。这是第二次测试,上一次是在2023年12月(参考:云数据库(RDS MySQL)性能深度测评与对比)。

    性能测试结果与概述

    (more…)
  • 云数据库技术动态@2024-05-31

    2024-05-31

    标题:阿里云RDS 5.7支持倚天ARM, PG新增集群版; 达梦科创板上市; SelectDB登顶ClickBench榜单

    重要更新

    本周,阿里云RDS 5.7版本支持了自研倚天ARM,该版本相比于intel/x86版本有更高的性价比(约30%);RDS PostgreSQL也推出了集群版,通过开放备实例只读,帮助用户获得更高性价比;此外,在解决方案体验馆,新增了加速IO方案(BPE);这三个大的功能点,只要打开方式正确,都可以帮助客户实现更高的性价比;可以看到,这一年,阿里云RDS团队,在帮助客户降本增效上很拼[4] [5] [6]

    现代化实时数仓 SelectDB 再次登顶 ClickBench 全球数据库分析性能排行榜[2] [3] ;该榜单与测试由ClickHouse推出,是单表分析场景公认的权威评测,登顶该榜单需要数据库/数仓具备高性能的扫描、过滤、聚合、排序、多核扩展、正则匹配等能力

    达梦数据库首次公开发行股票并在科创板上市(688692),成为国产数据库第一股;达梦数据库创办于2000年,由华中科技大学的冯裕才教授创办,一直深耕于Oracle替换、国家基础设施数据库国产化;达梦上市申请于2022年7月被受理,同年12月获批 [1]

    更新详情

    RDS MySQL
    • RDS MySQL 5.7支持经济版基于阿里云自研芯片倚天ARM,致力于提供性价比超高的实例规格 [4]
    • 解决方案体验馆新增”IO加速”案例,可以直观看到开启IO加速和不开启IO加速的实时压测情况[5]
    • RDS PostgreSQL支持创建集群系列实例。集群系列实例采用计算与存储分离、一主多备的架构,支持自动故障切换、任意备节点可切换为主节点、备节点可读、按需增删节点、多可用区容灾、节点粒度的监控、集群节点拓扑管理等功能,相较于自建数据库,更加经济、灵活、可靠。[8]

    GCP(谷歌云)

    • AlloyDB 联邦查询引擎支持访问BigQuery,用户可以在AlloyDB中同时访问BigQuery、AlloyDB中的数据 [35] 

    火山云(字节)

    • 托管MongoDB服务支持更多节点规格、优化了回档库表数据功能[39] [40]

    AWS(亚马逊云)

    • AWS发布Advanced Python Driver(GA),用于访问Aurora数据库 [48]

    参考链接

    • [1] https://static.sse.com.cn/disclosure/listedinfo/announcement/c/new/2024-05-30/688692_20240530_T1GF.pdf
    • [2] https://mp.weixin.qq.com/s/nOTs1xLxMV9BlcysRrj24g
    • [3] https://benchmark.clickhouse.com/
    • [4] https://help.aliyun.com/zh/rds/apsaradb-rds-for-mysql/new-function-specification-rds-mysql-5-7-support-economic-version
    • [5] https://help.aliyun.com/zh/rds/support/general-cloud-disk-io-acceleration-function-technology-introduction
    • [8] https://help.aliyun.com/zh/rds/apsaradb-rds-for-postgresql/rds-cluster-edition#cba0a8c4138u7
    • [9] https://help.aliyun.com/zh/rds/apsaradb-rds-for-sql-server/release-notes-for-minor-engine-versions-of-apsaradb-rds-for-sql-server
    • [35] https://cloud.google.com/bigquery/docs/alloydb-federated-queries
    • [36] https://docs.public.oneportal.content.oci.oraclecloud.com/iaas/releasenotes/changes/7a85d168-35f4-4da8-96e2-0fe32e2fa2ff/
    • [37] https://docs.public.oneportal.content.oci.oraclecloud.com/iaas/releasenotes/changes/8e6ae6ab-d126-4530-b623-ac1289908e79/
    • [38] https://docs.public.oneportal.content.oci.oraclecloud.com/iaas/releasenotes/changes/30341f89-e366-4788-a3ff-9c04efd9b463/
    • [39] https://www.volcengine.com/docs/6447/1122036
    • [40] https://www.volcengine.com/docs/6447/72369
    • [48] https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Connecting.html#Aurora.Connecting.Drivers
  • Sysbench老版本压测MySQL支持SSL/TLS的问题

    2024-05-27

    原本我一直是使用各个YUM仓库中默认的sysbench版本的,主要是考虑安装部署方便,而一直以来这个版本似乎都没有遇到什么问题,直到…尝试自动化的对Azure上的MySQL进行压测。

    默认的sysbench版本是1.0.17版(Mar 15, 2019),首先,是遇到了如下的报错信息:

    sysbench 1.0.17 (using system LuaJIT 2.0.4)
    
    FATAL: unable to connect to MySQL server on host 'xxx.mysql.database.azure.com', port 3306, aborting...
    FATAL: error 3159: Connections using insecure transport are prohibited while --require_secure_transport=ON

    在该版本中,sysbench提供了参数--mysql-ssl=[on|off]以尝试解决这个问题,但对于最新版本的MySQL,该参数很多时候都无法正常工作,如果你也尝试了该参数,那么会报如下错误:

    FATAL: unable to connect to MySQL server on host 'xxx.mysql.database.azure.com', port 3306, aborting...
    FATAL: error 2026: SSL connection error: SSL_CTX_set_default_verify_paths failed

    如果,恰好,你注意上面的报错可能是CA证书的问题,于是你也像我一样尝试通过 下载证书的方式去解决,并通过GitHub上的issue,成功将CA证书改名成cacert.pem,并放在当前的路径下,那么你还会遇到如下报错:

    SSL error: Unable to get certificate from 'client-cert.pem'
    FATAL: unable to connect to MySQL server on host 'xxx.mysql.database.azure.com', port 3306, aborting...
    FATAL: error 2026: SSL connection error: Unable to get certificate

    好了,也许你再成功生成client-cert.pem、client-key.pem的话,也许你真的能够运行成功。不过,再向后,我就没有尝试了,原因是,如果每一次测试都去获得各一个身份认证的密钥对,那么实在是太复杂了。

    最终,我根据AWS上这篇文章(Running sysbench on RDS MySQL… via SSL/TLS)的建议,尝试自己编译安装了最新版本的sysbench,也就是1.1.0版本。然后简单的使用参数--mysql-ssl=preferred或--mysql-ssl=required彻底的解决了这个问题。

    参考文档

    • 1.0.17版(Mar 15, 2019)
    • Running sysbench on RDS MySQL, RDS MariaDB, and Amazon Aurora MySQL via SSL/TLS
    • Connect to Azure Database for MySQL – Flexible Server with encrypted connections

  • 在OCI上,使用Terraform创建Compute/Database

    2024-05-25

    目录

    • 1 区域/Compartment/AD
    • 2 创建一个具备“公网”能力的子网
    • 3 Availability Domains
    • 4 创建计算资源(Compute)
      • 4.1 选择合适的image
      • 4.2 计算实例的配置
    • 5 创建数据库实例
    • 6 问题
    • 7 参考链接

    在开始创建Compute/Database资源之前,需要先完成认证,再将需要的基础资源准备好。基础资源包括VCN/Subnet等相关的网络基础组件。本文将通过简单的示例展示这些基础组件的创建。

    区域/Compartment/AD

    和所有的Provider一样,我们会在Oracle Cloud的provider基础配置中配置好region。在资源创建的时候,核心资源都需要配置compartment_id,可以简单理解为,该资源属于哪个逻辑组(关于Compartment)。例如,一个典型的、简单的VCN的创建代码如下:

    provider "oci" {
      region           = var.region
    }
    
    # 创建一个新的compartment,他的parent compartment是tenancy_id
    resource "oci_identity_compartment" "oic" {
        #Required
        compartment_id = var.tenancy_id
        description = "for database benchmark"
        name = var.naming
    }
    
    resource "oci_core_vcn" "ocv" {
        #Required
        compartment_id = oci_identity_compartment.oic.id
        cidr_block = "172.17.0.0/16"
        display_name = var.naming
    }

    创建一个具备“公网”能力的子网

    这里说的“公网”能力,包括了两个方面:

    • 一个是可以被公网访问,这样就可以ssh登录并管理
    • 一个是可以访问公网,这样就可以通过wget/git/yum等工具安装软件

    这里配置要求比较严谨,与AWS有一些类似。分为以下几个步骤:

    • 创建一个VCN(oci_core_vcn),创建一个对应的子网(oci_core_subnet)
      • 需要注意的是,在创建了VCN之后,OCI Terraform会默认的创建一组:默认的安全组(default_security_list_id)、默认的路由表(default_route_table_id)、默认的dhcp(default_dhcp_options_id)
    resource "oci_core_vcn" "ocv" {
        #Required
        compartment_id = oci_identity_compartment.oic.id
        cidr_block = "172.17.0.0/16"
        display_name = var.naming
        dns_label    = var.naming
    }
    
    # Creates a subnet
    resource "oci_core_subnet" "subnet_primary" {
      availability_domain = data.oci_identity_availability_domain.oad.name
      cidr_block          = "172.17.1.0/24"
      display_name        = "domain_primary"
      dns_label           = "tfsubnet"
      security_list_ids   = [oci_core_vcn.ocv.default_security_list_id]
      compartment_id      = oci_identity_compartment.oic.id
      vcn_id              = oci_core_vcn.ocv.id
      route_table_id      = oci_core_vcn.ocv.default_route_table_id
      dhcp_options_id     = oci_core_vcn.ocv.default_dhcp_options_id
    }
    • 创建一个具备互联网访问规则的网关
    resource "oci_core_internet_gateway" "internet_gateway" {
      compartment_id = oci_identity_compartment.oic.id
      display_name   = "InternetGateway"
      vcn_id         = oci_core_vcn.ocv.id
    }
    
    resource "oci_core_default_route_table" "route_table_for_internet" {
      manage_default_resource_id = oci_core_vcn.ocv.default_route_table_id
      display_name               = "RouteTableForInternet"
    
      route_rules {
        destination       = "0.0.0.0/0"
        destination_type  = "CIDR_BLOCK"
        network_entity_id = oci_core_internet_gateway.internet_gateway.id
      }
    }
    • 最后,添加合适的端口访问规则:
    resource "oci_core_security_list" "osl" {
      compartment_id = oci_identity_compartment.oic.id
      vcn_id         = oci_core_vcn.ocv.id
      display_name   = "${var.naming}SecurityList"
    
      ingress_security_rules {
        protocol  = "6" // tcp
        source    = "0.0.0.0/0"
        stateless = false
    
        tcp_options {
        #   source_port_range {
        #     min = 100
        #     max = 100
        #   }
    
        #  // These values correspond to the destination port range.
          min = 22
          max = 22
        }
      }
    }

    Availability Domains

    和Compartment一样,这是另一个Oracle Cloud上必须得,但是似乎必要性并不强的概念。在Oracle Cloud上,整体的资源位置从大到小:region -> Availability Domains -> Fault Domain。其中,Fault Domain可以理解为其他云的zone的概念,代表了一个IDC机房(可能是相邻的多个building),通常,3个Fault Domain构成一个Availability Domains。在一个Region通常只有一个Availability Domains,也有部分Region有2~3个Availability Domains。

    在Terraform中,如果确定了Region,我们需要使用data.oci_identity_availability_domain获取对应availability_domain的信息:

    data "oci_identity_availability_domain" "oad" {
        #Required
        compartment_id = oci_identity_compartment.oic.id
        ad_number = 1
    }

    创建计算资源(Compute)

    选择合适的image

    这里参考了example public_ip.tf@GitHub,使用了较为“直接”的方式(缺乏扩展性)获取需要镜像:

    variable "instance_image_ocid" {
      type = map(string)
    
      default = {
        # See https://docs.oracle.com/en-us/iaas/images/image/abf452f1-bf22-4837-b47b-79945ed26bee/
        # CentOS-7
        ap-tokyo-1  = "ocid1.image.oc1.ap-tokyo-1.aaaaaaaa4hzluwszvbv3m3m27pvly5qm6ldnjgibjxrexuhe4ky5ncijjsra"
      }
    }

    这里的ocid则是根据 Images@Oracle Cloud Infrastructure Documentation 列出的所有镜像选择而来。更具扩展性的做法应该是通过terraform data对象去获取。

    计算实例的配置

    在OCI中,计算实例的配置,相对来说是比较简单的:

    # Creates an instance (without assigning a public IP to the primary private IP on the VNIC)
    resource "oci_core_instance" "oi" {
      availability_domain = data.oci_identity_availability_domain.oad.name
      compartment_id      = oci_identity_compartment.oic.id
      display_name        = var.naming
      fault_domain        = var.zone_primary
      shape               = var.vm_instance_type
      shape_config {
        memory_in_gbs = 2
        ocpus = 1
      }
    
      source_details {
        source_type = "image"
        source_id   = var.instance_image_ocid[var.region]
        boot_volume_size_in_gbs = 50
      }
    
      create_vnic_details {
        assign_public_ip = true
        display_name     = "Vnic${var.naming}"
        subnet_id        = oci_core_subnet.subnet_primary.id
        hostname_label   = var.naming
      }
      metadata = {
        ssh_authorized_keys = var.publickey
      }
      preserve_boot_volume = false
    }

    上面通过:

    • source_details描述了使用的镜像以及启动盘的大小
    • create_vnic_details描述了VNIC的主要配置,包括所属子网、是否有绑定公网IP等
    • metadata则描述了ssh的公钥信息,实现秘钥对登录

    创建数据库实例

    在OCI上创建MySQL实例比较简单,选项也不多,实际在通过Terraform配置也比较简单和顺利:

    resource "oci_mysql_mysql_db_system" "om" {
    
      display_name = var.naming
      compartment_id = oci_identity_compartment.oic.id
    
      availability_domain = data.oci_identity_availability_domain.oad.name
      fault_domain = var.zone_primary
      is_highly_available = true
    
      admin_password = var.db_pass
      admin_username = var.db_user
    
      shape_name = var.rds_instance_type
      data_storage_size_in_gb = 100
    
      subnet_id = oci_core_subnet.subnet_primary.id
    
      ## this appear as optional in documentation
      ## but it is a must to add it
    
      deletion_policy {
        #Optional
        # automatic_backup_retention = false
        final_backup = "SKIP_FINAL_BACKUP"
        is_delete_protected = false
      }
    }

    问题

    400-InvalidParameter

    参数值错误有很多,根据报错这里是automaticBackupRetention相关的参数值错误,对应在Terraform中是deletion_policy中的automatic_backup_retention配置项,该选项并不是必须的,暂时删除解决。

    ╷
    │ Error: 400-InvalidParameter, Request contains an invalid value for 'com.oracle.oci.mysql.model.CreateDbSystemDetails$Builder["deletionPolicy"]->com.oracle.oci.mysql.model.CreateDeletionPolicyDetails$Builder["automaticBackupRetention"]'
    │ Suggestion: Please update the parameter(s) in the Terraform config as per error message Request contains an invalid value for 'com.oracle.oci.mysql.model.CreateDbSystemDetails$Builder["deletionPolicy"]->com.oracle.oci.mysql.model.CreateDeletionPolicyDetails$Builder["automaticBackupRetention"]'
    │ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/mysql_mysql_db_system
    │ API Reference:
    │ Request Target: POST https://mysql.ap-tokyo-1.ocp.oraclecloud.com/20190415/dbSystems
    │ Provider version: 5.42.0, released on 2024-05-19.
    │ Service: Mysql Db System
    │ Operation Name: CreateDbSystem
    │ OPC request ID: ...
    │
    │
    │   with oci_mysql_mysql_db_system.om,
    │   on rds.mysql.tf line 6, in resource "oci_mysql_mysql_db_system" "om":
    │    6: resource "oci_mysql_mysql_db_system" "om" {
    │

    参考链接

    • Regions and Availability Domains@Oracle Cloud Infrastructure Documentation
    • Data Source: oci_identity_availability_domain@OCI Terraform
    • Terraform: Create a Virtual Cloud Network@Oracle Cloud Infrastructure Documentation
    • Terraform: Create a Compute Instance@Oracle Cloud Infrastructure Documentation
    • example public_ip.tf@GitHub
    • oci_mysql_mysql_db_system@Terraform Docs

←Previous Page Next Page→
  • “众鸟高飞尽 孤云独去闲”
  • —唐 李白

关于我

© 2022

orczhou.com

·

Theme by Brian Gardner

本作品采用知识共享许可协议 许可协议进行许可。