-
Request Rate and Performance Considerations
AWS S3 Developer Guide (API Version 2006-03-01) -
How do I ingest a large number of small files from S3? My job looks like it's stalling.
Databricks Cloud support forum thread -
What is the best way to ingest and analyze a large S3 dataset?
Databricks Cloud support forum thread
docker run \ | |
--name {{printf "%q" .Name}} \ | |
{{- with .HostConfig}} | |
{{- if .Privileged}} | |
--privileged \ | |
{{- end}} | |
{{- if .AutoRemove}} | |
--rm \ | |
{{- end}} | |
{{- if .Runtime}} |
#@ /etc/quagga/bgpd.conf (Centos & Ubuntu) | |
hostname <Local OS hostname> | |
password <Any random phrase> | |
enable password <Any random phrase> | |
! | |
log file /var/log/quagga/bgpd | |
!debug bgp events | |
!debug bgp zebra | |
debug bgp updates |
WITH RECURSIVE | |
x(i) AS ( VALUES (0) | |
UNION ALL SELECT i + 1 | |
FROM x | |
WHERE i < 101), | |
Z(Ix, Iy, Cx, Cy, X, Y, I) AS ( | |
SELECT | |
Ix, | |
Iy, | |
X :: FLOAT, |
<jnlp spec="1.0+" codebase="https://localhost:8443/"> | |
<information> | |
<title>ATEN Java iKVM Viewer</title> | |
<vendor>ATEN</vendor> | |
<description>Java Web Start Application</description> | |
</information> | |
<security> | |
<all-permissions/> | |
</security> |
Why not set backlog on Heroku?
First read this: https://mikecoutermarsh.com/adjusting-pumas-backlog-for-heroku/
Now we're on the same page. Heroku will re-route bounced requests from your dynos but it assumes when this happens that your entire app is saturated. https://devcenter.heroku.com/articles/http-routing#dyno-connection-behavior. Each connection gets delayed by 5 seconds, so you're automatically being docked 5 seconds per request.
If you're setting your backlog to a low value (i.e. if you'll ever actually ever hit backlog) then you'll be in for pain. When you get a spike of requests from slashdot/reddit/whatever you're telling your dynos that you would rather they failed then returned slow responses. So this does mean that some requests will be served, but all the others will fail.
If your app ever hits your backlog (no matter what value it is) it is an indicator you don't have enough throughput and you need to scale out to more dynos. If you set this to an arbitrarilly low value, that point comes
# config/routes.rb | |
resources :documents do | |
scope module: 'documents' do | |
resources :versions do | |
post :restore, on: :member | |
end | |
resource :lock | |
end | |
end |
/* | |
Challenge 2: Hill | |
Given an array of integer elements | |
Your task is to | |
* write a function that finds the minimum value X that makes possible the following: generate a new array that is sorted in strictly ascending order by increasing or decreasing each of the elements of the initial array with integer values in the [0, X] range. | |
Example: Having the initial array [5, 4, 3, 2, 8] the minimum value for X is 3. Decrease the first element (5) by 3, decrease the second one (4) by 1, increase the third one (3) by 1, increase the forth one (2) by 3 and do nothing to the last one (8). In the end we obtain the array [2, 3, 4, 5, 8] which is sorted in strictly ascending order. | |
module AlertConfirmer | |
class << self | |
def reject_confirm_from &block | |
handle_js_modal 'confirm', false, &block | |
end | |
def accept_confirm_from &block | |
handle_js_modal 'confirm', true, &block | |
end |
#!/bin/bash | |
# Hacked together by JeroenJanssens.com on 2013-12-10 | |
# Requires: https://github.com/joewalnes/websocketd | |
# Run: websocketd --devconsole --port 8080 ./chat.sh | |
echo "Please enter your name:"; read USER | |
echo "[$(date)] ${USER} joined the chat" >> chat.log | |
echo "[$(date)] Welcome to the chat ${USER}!" | |
tail -n 0 -f chat.log --pid=$$ | grep --line-buffered -v "] ${USER}>" & | |
while read MSG; do echo "[$(date)] ${USER}> ${MSG}" >> chat.log; done |