odyssey 试用

以下是odyssey 的一个试用

环境准备

  • docker-compose 文件
version: "3"
services:
  postgres:
    image: postgres:12
    ports:
      - "5432:5432"
    environment:
      - "POSTGRES_PASSWORD=dalong"
  pgbouncer:
    image: brainsam/pgbouncer
    ports:
      - "6543:6543"
    volumes:
      - "./pgbouncer.ini:/etc/pgbouncer/pgbouncer.ini"
      - "./users.txt:/opt/auth/users.txt"
  app:
    image: kksudo/odyssey-docker:1.1
    ports:
      - "6432:6432"
    volumes:
      - "./odyssey-dev.conf:/etc/odyssey/odyssey.conf"
  • 说明
    环境包含了pgbouncer以及odyssey,配置说明
    pgbouncer.ini
 
[databases]
postgres = host=postgres port=5432  auth_user=postgres
[pgbouncer]
listen_addr = 0.0.0.0
auth_type = md5
auth_file = /opt/auth/users.txt
listen_port = 6543
ignore_startup_parameters = extra_float_digits
verbose = 2
admin_users = postgres

odyssey.conf

daemonize no
unix_socket_dir "/tmp"
unix_socket_mode "0644"
log_format "%p %t %l [%i %s] (%c) %m\n"
log_to_stdout yes
log_syslog no
log_syslog_ident "odyssey"
log_syslog_facility "daemon"
log_debug yes
log_config yes
log_session yes
log_query no
listen {
    host "*"
    port 6432
    backlog 128
}
storage "postgres_server" {
    type "remote"
    host "postgres"
    port 5432
}
database default {
    user default {
        authentication "md5"
        storage "postgres_server"
        pool "transaction"
        pool_size 0
        pool_timeout 0
        pool_ttl 60
        password "md5f293e70a2114bd91a4a1203a5f0548cd"
        pool_discard no
        pool_cancel yes
        pool_rollback yes
        client_fwd_error yes
        application_name_add_host yes
        server_lifetime 3600
        log_debug no
        quantiles "0.99,0.95,0.5"
    }
}
storage "local" {
    type "local"
}
database "console" {
    user default {
        authentication "none"
        pool "session"
        storage "local"
    }
}

访问

我们可以通过 127.0.0.1 6543 postgres dalong 以及6432 端口,odyssey 是一个很不错的选择,同时配置上还是比较清晰的

参考资料

https://github.com/yandex/odyssey/blob/master/documentation/configuration.md#example-1
https://www.pgbouncer.org/
https://github.com/rongfengliang/postgres-connect-pool-tools-learning

posted on   荣锋亮  阅读(360)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2019-08-22 singer tap-minio-csv 使用
2019-08-22 Singer 修改tap-s3-csv 支持minio 连接
2018-08-22 streamsets rest api 转换 graphql
2018-08-22 StreamSets sdc rpc 测试
2018-08-22 StreamSets 相关文章
2018-08-22 StreamSets 多线程 Pipelines
2018-08-22 StreamSets SDC RPC Pipelines说明

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示