mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:42:02 +08:00
df4a9f96ae
We'd like to lean on the DNS caching service for more than the standard DB and Redis hosts, but without having to add additional code each time. Define a new environment variable DISCOURSE_DNS_CACHE_ADDITIONAL_SERVICE_NAMES (admittedly a mouthful) which is a list of service names to be added to the static list at process execution time. For example, plugin foo may reference two services that you want to cache the address of. By specifying the following two variables in the process environment, cache_critical_dns will perform the lookup alongside the DB and Redis host variables. ``` DISCOURSE_DNS_CACHE_ADDITIONAL_SERVICE_NAMES='FOO_SERVICE1,FOO_SERVICE2' FOO_SERVICE1='foo.service1.example.com' FOO_SERVICE1_SRV='foo._tcp.example.com' FOO_SERVICE2='foo.service2.example.com' ``` The behaviour when it comes to SRV record lookup is the same as previously implemented for the `DISCOURSE_DB_..` and `DISCOURSE_REDIS_..` variables. For the purposes of the health checks, services defined in the list _are always considered healthy_. This is a compromise for conveniences sake. Defining a dynamic method for health checks at runtime is not practical. See t/88457/32. |
||
---|---|---|
.. | ||
benchmarks | ||
bulk_import | ||
demon_test | ||
import_scripts | ||
.gitignore | ||
alice.txt | ||
analyse_message_bus.rb | ||
analyze_sidekiq_queues.rb | ||
bench.rb | ||
biggest_objects.rb | ||
boot_mem.rb | ||
cache_critical_dns | ||
check_forking.rb | ||
copyright-deposit | ||
db_timestamps_mover.rb | ||
diff_heaps.rb | ||
discourse | ||
docker_test.rb | ||
i18n_lint.rb | ||
measure.rb | ||
memory-analysis | ||
memstats.rb | ||
micro_bench.rb | ||
mwrap_sidekiq | ||
profile_db_generator.rb | ||
promote_migrations | ||
rails | ||
redis_memory.rb | ||
require_profiler.rb | ||
spawn_backup_restore.rb | ||
start_test_db.rb | ||
switch_container_ruby | ||
test_email_settings.rb | ||
test_mem.rb | ||
test_memory_leak.rb | ||
test_pretty_text.rb | ||
thread_detective.rb | ||
user_simulator.rb |