dst_blacklist.txt 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. Destination blacklist Overview
  2. ------------------------------
  3. The destination blacklist (dst_blacklist) is used to try to mark bad
  4. destinations and avoid possible future expensive send operation to them.
  5. A destination is added to the blacklist when an attempt to send to it fails (e.g.
  6. timeout while trying to send or connect on TCP), or when a SIP timeout occurs
  7. while trying to forward statefully an INVITE (using tm) and the remote side
  8. doesn't send back any response.
  9. The blacklist (if enabled) is checked before any send attempt.
  10. Drawbacks
  11. ---------
  12. Using the destination blacklist will cause some performance degradation,
  13. especially on multi cpu machines. If you don't need it you can easily
  14. disable it, either in sip-router's config or at compile time. Disabling it at
  15. compile time is slightly better (but not in a "measurable" way) than
  16. disabling it at runtime, from the config file.
  17. Whether the destination blacklist is a good solution for you depends a lot
  18. on the setup. In general it is better to turn it on when:
  19. - sending to clients that don't respond is expensive (e.g. lots of clients
  20. use tcp and they have the habit of silently discarding tcp traffic from time
  21. to time)
  22. - stateful forwarding is used (tm) and lower memory usage is desired
  23. (a transaction will fail immediately if the destination is already
  24. blacklisted by a previous transaction to the same destination that failed
  25. due to timeout)
  26. - faster dns failover is desired, especially when stateful forwarding (tm)
  27. and UDP are used
  28. - better chances of DOS attack survival are important
  29. Config Variables
  30. ----------------
  31. use_dst_blacklist = on | off (default off) - enable the destination blacklist:
  32. If on each failed send attempt will cause the destination to be blacklisted.
  33. Before any send operation this blacklist will be checked and if a match is found the
  34. send is no longer attempted (an error is returned immediately).
  35. Note: using the blacklist incurs a small performance penalty.
  36. dst_blacklist_mem = size in Kb (default 250 Kb) - maximum
  37. shared memory amount used for keeping the blacklisted destinations.
  38. dst_blacklist_expire = time in s (default 60 s) - how long time a
  39. blacklisted destination will be kept in the blacklist (w/o any update).
  40. dst_blacklist_gc_interval = time in s (default 60 s) - how often the
  41. garbage collection will run (eliminating old, expired entries).
  42. dst_blacklist_init = on | off (default on) - if off, the blacklist
  43. is not initialized at startup and cannot be enabled at runtime,
  44. which saves some memory.
  45. Compile Time Options
  46. --------------------
  47. USE_DST_BLACKLIST - if defined the blacklist support will be compiled-in
  48. (default).
  49. Note: To remove a compile time option, edit the file Makefile.defs and remove
  50. USE_DST_BLACKLIST from the list named DEFS.
  51. To add a compile time option, just add it to the make command line,
  52. e.g.: make proper; make all extra_defs=-DUSE_DNS_FAILOVER
  53. or for a permanent solution, edit Makefile.defs and add it to DEFS
  54. (don't forget to prefix it with -D).