-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General Cache #43
Comments
We have implemented a simple cache for what I expected to be a bottle neck (calculating scores), but not for the challenges. The problem is that the current implementation makes several queries for each problem, which should be changed without a doubt. I just honestly never expect > 100 challenges. |
Leave it to me to break things :) My CTF is still two months out so I'm doing all kinds of testing of the platform |
I really appreciate the feedback. It's good to have actual use cases that occur more frequently than once per year. That last commit implements the built-in rails caching for each problem page. That might start to solve your problem. I won't be able to generate a test case that large until this weekend (I'll automate it, but writing the automation won't be trivial). If you get a chance, see if that scratches your itch. The commits are in the 'dev' branch. |
Also, worth mentioning, the cache will only actually work in a "production" environment... so you'll have to run it inside the container or on Heroku to test. |
Nice, I am running the app in "Production" just using a .env to set all the
env vars I need beforehand
Also, I'm running my CTF from an ARM64 2GB Scaleway and its been doing
pretty well, Just docker tends to not work to well in that method.
…On Fri, Feb 16, 2018 at 6:55 AM, Paul Jordan ***@***.***> wrote:
Also, worth mentioning, the cache will only actually work in a
"production" environment... so you'll have to run it inside the container
or on Heroku to test.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAxE1PpWL0gdSeFNW1h-QxrQibNFyWlyks5tVWzIgaJpZM4SG-iN>
.
|
RAILS_ENV=production
RACK_ENV=production
RAILS_SERVE_STATIC_FILES=enabled
LANG=en_US.UTF-8
PORT=3000
SSL_KEY=certs/server.key
SSL_CERT=certs/server.crt
DATABASE_URL=postgresql://xx:xx@localhost/postgres
REDISTOGO_URL=redis://127.0.0.1:6379/
HOST=ctf.bsidesroc.com
…On Fri, Feb 16, 2018 at 7:21 AM, Forrest Fuqua ***@***.***> wrote:
Nice, I am running the app in "Production" just using a .env to set all
the env vars I need beforehand
Also, I'm running my CTF from an ARM64 2GB Scaleway and its been doing
pretty well, Just docker tends to not work to well in that method.
On Fri, Feb 16, 2018 at 6:55 AM, Paul Jordan ***@***.***>
wrote:
> Also, worth mentioning, the cache will only actually work in a
> "production" environment... so you'll have to run it inside the container
> or on Heroku to test.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#43 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAxE1PpWL0gdSeFNW1h-QxrQibNFyWlyks5tVWzIgaJpZM4SG-iN>
> .
>
|
Awesome! Did the caching improve the performance? Yeah, it looks like ARM64 isn't "officially" supported. Does it not build, or does it just not work? |
Arm64 is fine outside of docker, ill look into it more for you,
scaleways are amazing for setting up small VPS quickly
…On Sat, Feb 17, 2018 at 1:20 PM, Paul Jordan ***@***.***> wrote:
Awesome! Did the caching improve the performance? Yeah, it looks like
ARM64 isn't "officially" supported. Does it not build, or does it just not
work?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAxE1ICktWgy-8suqHGr_M-m6Xjm3Gpoks5tVxhlgaJpZM4SG-iN>
.
|
should note, I think getting a docker version running on a rpi might be the
best target to approach
…On Sat, Feb 17, 2018 at 1:27 PM, Forrest Fuqua ***@***.***> wrote:
Arm64 is fine outside of docker, ill look into it more for you,
scaleways are amazing for setting up small VPS quickly
On Sat, Feb 17, 2018 at 1:20 PM, Paul Jordan ***@***.***>
wrote:
> Awesome! Did the caching improve the performance? Yeah, it looks like
> ARM64 isn't "officially" supported. Does it not build, or does it just not
> work?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#43 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAxE1ICktWgy-8suqHGr_M-m6Xjm3Gpoks5tVxhlgaJpZM4SG-iN>
> .
>
|
Interesting. So getting Docker running these days on arm is pretty straight forward (I've got an old Pi running it right now). I'm just not sure if the image needs to be specified. I'm pretty sure it does, but that's easy. You'd just change the "FROM" directive to: "FROM: arm64v8/ruby:2.5" (I'm currently in the process of overhauling the Dockerfile though, so I'd hold off for a few minutes). |
I didn't spot one, but does the platform have an internal cache for things? page loads on my end are getting a little slow under problems due to the amount of challenges I have added (up to 151)
Memcache or Redis would be suggested.
The text was updated successfully, but these errors were encountered: