Commit Graph

13 Commits

Author SHA1 Message Date
Cody Cutrer c4083f2c98 add a periodic job that detects if HACache invalidations are working
and report to statsd (datadog)

Change-Id: Ie34dd8bbcd948c68087d54626c20dbf8d5503102
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248332
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-09-25 16:58:57 +00:00
Cody Cutrer 107ec11e5b properly reset multicache
since we're allowing a nil @multi_cache object, setting it to nil not only means we don't
reload it, it means we completely ignore it and always fall back to Rails.cache

Change-Id: I9a537b00de860bb53a7cc34e605eb6ab8f6d1f6f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235685
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-04-29 20:15:22 +00:00
Cody Cutrer f58c60833b move Switchman.cache setup even earlier in the boot process
so that the default shard will use it as well

this also means MultiCache will load earlier, so move #cluster to Canvas
instead of ApplicationController to reduce how much is loaded. and don't
memoize the value of Rails.cache at that point, since it might not be
fully configured yet if you're not using ha_cache.yml

Change-Id: I104d7a3dcd69c6cb97e4083e198ac06c60700f9e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234253
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-04-16 17:24:58 +00:00
Cody Cutrer aa5811bdff drop support for a Redis ring as MultiCache
plz to just use HACache

Change-Id: I06bb7d23ee24e1ef11be87af7745880ddcebd4bf
Reviewed-on: https://gerrit.instructure.com/205564
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-08-21 18:21:46 +00:00
Cody Cutrer c9aab282ba use rails built-in RedisCacheStore
RedisStore is no longer supported

somewhat surprisingly, the serialization formats are compatible, so we don't
need to do any namespacing

Change-Id: Iede3a023cada95313875f0ce419b649c364ee97c
Reviewed-on: https://gerrit.instructure.com/202663
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-08-09 20:22:56 +00:00
Cody Cutrer 2cfeeae20e configure multicache via consul
closes CNVS-39230

Change-Id: Iabe72578d52079628a18d2212b40a8a85e273b26
Reviewed-on: https://gerrit.instructure.com/125589
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-09-12 22:49:16 +00:00
Landon Wilkins 5ba312a04d da licença part 32
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: Ibb971e1256b9ebf4ed4b50efac991472abba82fc
Reviewed-on: https://gerrit.instructure.com/110058
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-27 22:00:01 +00:00
Cody Cutrer 60b4dcf606 allow fetching all existing values for a MultiCache
just use fetch(key, node: :all) without a block

Change-Id: I9015b5db56991aebe599f143f4ea4d97beeb40b5
Reviewed-on: https://gerrit.instructure.com/90080
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-09-13 21:41:28 +00:00
Cody Cutrer bff69a3f00 option for writing to all nodes in a multicache ring
refs CNVS-30659

Change-Id: I2fcc74e9a4bede89adb1122bcea8fea7925805f2
Reviewed-on: https://gerrit.instructure.com/86735
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-08-11 17:46:31 +00:00
Cody Cutrer 01726bf6bf fix MultiCache delete deleting from all nodes
Change-Id: I74310b70472b472c89f00aa68325f4aad87200b3
Reviewed-on: https://gerrit.instructure.com/54573
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-05-19 17:59:22 +00:00
Cody Cutrer abc23822f1 improve multicache
explicitly have one copy per node in a ring (instead of relying
on hashing of a different to hopefully evenly spread copies around
the ring).

test plan:
 * configure a ring of redis servers for cache
 * canvas should still work

Change-Id: I17e086aac28c1c095c9717a7625ca51c86d0598f
Reviewed-on: https://gerrit.instructure.com/48069
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-05-06 19:21:21 +00:00
Cody Cutrer 54c3712427 allow specifiying the number of copies for multicache
so that we can support variable keys

Change-Id: Ibd932e47cac57b6f57c62bf1ff3cc1c93460ce3c
Reviewed-on: https://gerrit.instructure.com/48062
Tested-by: Jenkins
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-02-02 21:41:40 +00:00
Cody Cutrer a8c7bb617c refactor keeping multiple copies of a specific cache key into a helper class
Change-Id: I7fd54391837e70fcb21b16573e2eb73cf533eb03
Reviewed-on: https://gerrit.instructure.com/42490
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-10-27 20:01:55 +00:00