openresty / drizzle-nginx-module

an nginx upstream module that talks to mysql and drizzle by libdrizzle
http://wiki.nginx.org/NginxHttpDrizzleModule
336 stars 58 forks source link

resolver support for Amazon RDS #21

Open sayap opened 10 years ago

sayap commented 10 years ago

With Amazon RDS, the ip address can change after certain modifications (upgrade to more powerful instance, add more disk space, etc). It seems like drizzle-nginx-module resolves the hostname on startup only. Is it possible to get it to use http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver?

Otherwise, I think I can live with writing a bash script that does periodic dig and reloads nginx when the address changes, just to continue using openresty :)

agentzh commented 10 years ago

@sayap You're welcome to submit patches to this module :)

But I'd suggest you take a look at the lua-resty-mysql library instead which does what you want:

https://github.com/openresty/lua-resty-mysql#readme