It's kind of similar to a lot of other really big systems (like
facebook). Authoritative data in an SQL database and then their read
data in denormalized structures in a NoSQL database.
--
Michael Peters
Plus Three, LP
emory), shared_cache (shared memory), double_cache
(mix of normal cache and shared_cache) or file_cache (no extra memory
uses the filesystem so slower).
In fact, if you using normal CGI you can only use shared_cache or
file_cache.
--
Michael Peters
Plus Three, LP
hat will
never receive any further security fixes.
--
Michael Peters
Plus Three, LP
can do that too.
When you use Apache::DBI and then call DBI->connect or
DBI->connect_cached you'll get the same database connection every time
(per process of course).
--
Michael Peters
Plus Three, LP
s using a different Apache MPM.
I haven't seen anyone give a definitive guide to how to do this
(although I could have missed something) and results seem to be mixed.
I prefer #2 and use it constantly. It also makes it really easy to have
separate dev environments each using their own code.
--
Michael Peters
Plus Three, LP
to do it?
The same way you're doing it now with Storable and a file. But instead
of reading a file you read a database field.
--
Michael Peters
Plus Three, LP
o have some non-mod_perl processes
involved somewhere.
I prefer to use environment variables if you need to specify the
location of a config file. These are available no matter where you're
running (in mod_perl you'll want to use a PerlPassEnv directive so the
mod_perl side sees it)
pick a backend
format. But in practice it probably doesn't matter a whole lot which
config module you use as long as it's not tied to Apache. But if you
like the apache-style format you can use Config::ApacheFormat which
works well.
--
Michael Peters
Plus Three, LP
t's a good idea to do a
redirect after a POST anyway since it prevents other problems.
--
Michael Peters
Plus Three, LP
e the future of such work and will thus get new
features and be better maintained than lots of other alternatives.
--
Michael Peters
Plus Three, LP
's anywhere close to mod_perl than I suspect
lots of people would use it instead since it's much easier to setup and
also much easier to package with your app since it's just a CPAN module.
Would be nice to through FastCGI into that benchmark too.
--
Michael Peters
Plus Three, LP
ok at doing proxy + pound)
--
Michael Peters
Plus Three, LP
loads.
--
Michael Peters
Plus Three, LP
r to completely force a
reload. Apache::Reload tries it's best but there are lots of modules it
can't handle. It's not it's fault really, it's a feature that's missing
in Perl.
These days, I never use Apache::Reload. I just restart my dev server (
yes, I believe each dev should have their own dev Apache server).
--
Michael Peters
Plus Three, LP
hings were running doesn't apply then, right? This memory isn't in
swap, it's just not in RAM. So turning off swap won't cause the
shared/unshared sizes to blow up, right?
--
Michael Peters
Plus Three, LP
fit into memory.
Or am I missing something?
--
Michael Peters
Plus Three, LP
On 01/27/2011 07:41 PM, Michael Ludwig wrote:
Michael Peters schrieb am 27.01.2011 um 19:14 (-0500):
But, even after all that I have applications where we consistently
run 3-4G just for mod_perl/Apache.
But surely not in one process as the OP said he'd like to do?
No you're righ
e
number of memory-heavy mod_perl processes/threads and handle the same
number of connections.
But, even after all that I have applications where we consistently run
3-4G just for mod_perl/Apache.
--
Michael Peters
Plus Three, LP
e the final conf.
Works quite well for us.
--
Michael Peters
Plus Three, LP
ndler Authen->special
Try that and see if it works
--
Michael Peters
Plus Three, LP
nt operating systems).
--
Michael Peters
Plus Three, LP
On 05/15/2010 04:47 PM, André Warnier wrote:
A tip : to get a really unique identifier
Another tip: to get a really unique identifier use mod_unique_id or
Data::UUID or the UUID() function in mysql.
--
Michael Peters
Plus Three, LP
;t overloading. But most
people in this situation will use a proxy like DBD::Gofer to manage the
DB connections.
--
Michael Peters
Plus Three, LP
On 03/23/2010 05:28 PM, Michael Ludwig wrote:
What could be done at the connection level?
Anything that might involve keep alive connections: where the same
connection serves multiple requests. Probably not that useful for HTTP,
but might be for other protocols.
--
Michael Peters
Plus
think of a mod_rewrite rule
to automatically look for the cached file first and send that before
even getting to the CGI script would be your best bet for performance.
--
Michael Peters
block) assuming the IP of your machine is 1.2.3.4
Order Deny,Allow
Deny from all
Allow from 1.2.3.4
--
Michael Peters
Plus Three, LP
On 02/10/2010 08:45 AM, Mark Stosberg wrote:
Is anyone here using this as an initial dispatcher to pass things on to
CGI::Application::Dispatch?
I've used both in different projects, but never together in the same
project.
--
Michael Peters
Plus Three, LP
Well, that was embarrassing :) Please ignore.
--
Michael Peters
Plus Three, LP
patches/
see:
http://www.apache.org/dist/httpd/Announcement1.3.html
--
Michael Peters
Plus Three, LP
overriding rule is that you can't use database handles opened
before a fork in the child processes after the fork. You need to close
those handles and reopen them.
--
Michael Peters
Plus Three, LP
ou do so. I wouldn't expect it to be a full 2X jump, so something
else might be amiss. Besides the 32v64bit change is all the other
software the same?
--
Michael Peters
Plus Three, LP
quot; can remove ENV vars). And then
you'll need a "PassEnv LD_LIBRARY_PATH" and a "PerlPassEnv
LD_LIBRARY_PATH". But you can't do a "SetEnv LD_LIBRARY_PATH" in your
httpd.conf.
Not sure if that will help or not though since it's been a while since
I've touched AIX.
--
Michael Peters
Plus Three, LP
quickly saw Stardust.
--
Michael Peters
Plus Three, LP
e not supposed to mix the 2, but most systems allow it anyways. But
maybe it's tickling a bug here.
--
Michael Peters
Plus Three, LP
cts modules that dynamically add methods to classes
(like most ORMs, Moose, etc).
--
Michael Peters
Plus Three, LP
r. This is just slightly more complicated to set up, but is the
most flexible and doesn't require as many resources as it initially appears.
--
Michael Peters
Plus Three, LP
nfig files, especially if you have
multiple sites with basically the same config. I also use templated
config files so that the template I'm working on looks a lot like the
finished product. It's easier to prevent typos this way, IMO.
--
Michael Peters
Plus Three, LP
). It wouldn't be immediate response, could definitely be done
in under a minute.
--
Michael Peters
Plus Three, LP
modperl Registry?
This is probably the biggest bang for the buck. I wouldn't recommend it
as a way to start a new application, but for migrating an existing
application its a very good choice.
--
Michael Peters
Plus Three, LP
You should check out Template Toolkit
(http://search.cpan.org/perldoc?Template) or HTML::Template
(http://search.cpan.org/perldoc?HTML::Template).
--
Michael Peters
Plus Three, LP
im".
Why does this have to be server side? Why can't it be part of the
cookie's (tamper proof) data itself?
--
Michael Peters
Plus Three, LP
still safe. It's only if they find
out your secret key that you'll have problems. But that's the same for
SSL, PGP and any other crypto.
--
Michael Peters
Plus Three, LP
On 09/18/2009 11:19 AM, Randal L. Schwartz wrote:
Yes. Welcome to phase 2. Eventually, you'll enter phase 3.
I used to be a phase 3 convert and then some really smart people
convinced me otherwise :)
--
Michael Peters
Plus Three, LP
to completely secure the
data, encrypt it.
--
Michael Peters
Plus Three, LP
7;t need to go down that
road, why do it in the first place?
--
Michael Peters
Plus Three, LP
If it is sensitive, then encryption works for cookies
too. I'm not saying there aren't uses for large server side sessions,
but I think they are pretty few.
--
Michael Peters
Plus Three, LP
t before
any HTML content. So instead of just printing the content as you go, why
don't you collect your HTML into a variable and then print it all out at
the end.
--
Michael Peters
Plus Three, LP
to that you can send the appropriate HTTP cache headers so that browsers
themselves will never request that image again. Make the client machine
do the caching.
--
Michael Peters
Plus Three, LP
ss you
changed your application code and in that case you can clear you cache).
--
Michael Peters
Plus Three, LP
ta in cached memory,
You could do the same with your session data, or even store it in a
shared resource like a BDB file. But unless it's available to all of
your web servers you're stuck with "sticky" sessions and that's a real
killer for performance/scalability.
--
Michael Peters
Plus Three, LP
read only data, and only access the master
for INSERT and UPDATE and DELETE.
Reducing DB usage is more important than this. Also, before you go down
that road you should look at adding a caching layer to your application
(memcached is a popular choice).
--
Michael Peters
Plus Three, LP
is the one that's used in the
compilation of mod_perl.
--
Michael Peters
Plus Three, LP
d how to put things where I want
them. If you do it differently it makes our lives harder.
I guess what it comes down to is that putting modules into non-standard places
is pretty common, so please don't implement your own way of doing that.
--
Michael Peters
Plus Three, LP
by
one tester, a week after uploading it. Maybe that's because of
the new query in Makefile.PL!
That's why prompts are evil. Automated tests won't work. So just bomb out and at
least you'll get lots of UNKNOWN test results which is better than nothing :)
--
Michael Peters
Plus Three, LP
ured. There are some rare occasions where it
makes sense to ask some questions, but where you want the module installed is
not one of them. CPAN takes care of that.
--
Michael Peters
Plus Three, LP
lt of having incompatible binaries/libs on your system. Is there
anything in your error logs about this?
--
michael peters
I played golf... I did not get a hole in one, but I did hit a guy. That's way
more satisfying. - Mitch Hedberg
ses it you're also ok. But if it opens a filehandle and then
keeps it around you can't share it. All sorts of bad and weird things can and
will happen in very unpredictable ways when inherited filehandles are used by
forked children.
--
Michael Peters
Plus Three, LP
wed would
only have a single Geo::IP object per-process (although you probably don't want
to use a global like that. A local (my) or package visible (our) variable is
probably better.
Why do you want to share it between your processes?
--
Michael Peters
Plus Three, LP
can a 64bit box will let you cram in more. Memory will almost definitely be
your bottleneck since Perl sometimes trades memory for speed.
--
Michael Peters
Plus Three, LP
ion it seemed like those errors he was getting
were unrelated to the 404/ErrorDocument part of it. But I'm wondering if his "it
works" was just Apache sending it's default 404 document and not the one in the
custom ErrorDocument.
--
Michael Peters
Plus Three, LP
's internal 404 document
(not the browser's) just not my custom ErrorDocument. The HTTP status header is
also the same between the requests.
--
Michael Peters
Plus Three, LP
jtibbn?q=Apache::Registry+404+ErrorDocument#query:Apache%3A%3ARegistry
404 ErrorDocument+page:1+mid:xtfrl2hywqugoqlh+state:results) it seems that it
worked (mostly for Mark Stosberg) so there's a glimmer of hope.
--
Michael Peters
Plus Three, LP
x27;s how I know that it's not the browser silently ignoring my
ErrorDocument (which IE is known to do).
Has anyone else done this before or can someone confirm to me that it should
work? Would help to know that I'm not chasing an impossible dream.
--
Michael Peters
Plus Three, LP
atus(NOT_FOUND);
The browser does get the 404 HTTP status header, but it does not trigger the
ErrorDocument 404 that is set up, instead just showing the browser's built-in
404 message. PerlSendHeaders is Off and I'm not printing any output.
So what am I missing?
--
Michael Peters
Plus Three, LP
ot 200 ?
Seems you have some sort of Auth handler in front that does a redirect (which is
what a 302 is). If you want to find out why you should try hitting that resource
with your browser pretending to be the Googlebot. If you're using Firefox you
should look at the User Agent Switcher plugin.
--
Michael Peters
Plus Three, LP
Jeff Pang wrote:
How google achieve this? Thanks.
Completely off topic. Next time please label your subject with an OT so we're
know. But I suspect they are using flash (which most music players use) and
flash has it's own cookie system which is outside of the browsers.
--
Mich
features and bug fixes. For full details
please see the change log located at
https://sourceforge.net/project/shownotes.php?release_id=668591&group_id=103045
--
Michael Peters
Plus Three, LP
idn't have to do anything to have it
enabled under mod_perl1.
--
Michael Peters
Plus Three, LP
atus == SERVER_ERROR;
my $error = $r->notes('error-notes') || $ENV{ERROR_NOTES};
return DECLINED unless $error;
# create your email message and send it. I also like to put in a
# Data::Dumper dump of %ENV, the URL, timestamp and other project
# specific config set
ation. What are your reasons for wanting
to do that?
--
Michael Peters
Plus Three, LP
t; var
can't be seen outside of the package/scope it's in. A package level "our" var can be seen.
--
Michael Peters
Plus Three, LP
em with that is that they are useful for having things like Singleton's that don't change
between invocations of the script (like a Conf object).
--
Michael Peters
Plus Three, LP
Apache. The only exception would be if someone wrote a compatibility layer between some
other HTTP server and Apache, but that would almost certainly not save you any memory.
--
Michael Peters
Plus Three, LP
x27;s a valid way to implement it (usually called
a Singleton pattern).
--
Michael Peters
Plus Three, LP
have 1 Dog then you don't need to ever have
instances, right?
--
Michael Peters
Plus Three, LP
nto the Perl
community is necessary and important one. Without it we won't get the next generation of people I'll
need to hire :)
--
Michael Peters
Plus Three, LP
t those weren't very fun weeks :)
--
Michael Peters
Plus Three, LP
Perrin Harkins wrote:
I haven't seen a good comparison that hits
all the popular proxy servers (perlbal, pound, nginx, lighttpd,
apache, squid... I think I'm forgetting some) but I've wanted one
before.
If you could include varnish, I'd be really happy :)
--
Michael Peters
Plus Three, LP
t compression. Especially looking at the waterfall display.
--
Michael Peters
Plus Three, LP
Or split them up. If you have any static assets that can benefit from mod_deflate (Javascript, CSS,
etc) then put mod_deflate on the proxies and mod_perl, mod_cache on the backend.
--
Michael Peters
Plus Three, LP
Perrin Harkins wrote:
On Mon, Nov 24, 2008 at 3:16 PM, Michael Peters <[EMAIL PROTECTED]> wrote:
Well except for getting 15K disks you probably won't be able to get much
more improvement from just the hardware.
You don't think so? RAID and SSD can both improve your write
t
Michael Peters wrote:
According to these benchmarks
(http://fsbench.netnation.com/new_hardware/2.6.0-test9/scsi/bonnie.html)
ReiserFS handles deletes much better than ext2 (10,015/sec vs 729/sec)
But these benchmarks (http://www.debian-administration.org/articles/388) say
the following
h better than ext2 (10,015/sec vs 729/sec)
--
Michael Peters
Plus Three, LP
7;s not that hard to port one of them if you need to.
--
Michael Peters
Plus Three, LP
Hmm, this is making me want to run benchmarks! Maybe a solid set of
benchmarks would be a fun OSCON presentation next year.
++
I've loved your other comparison talks in the past and this would be a nice one. Make sure to
include the new Mojo (kind of like Mongrel but in Perl).
--
Mi
x27;t work.
Why do you mean by "this doesn't work". There are lots of ways for it to work incorrectly. Should we
guess? Ok, my guess is that's it's going to /ex_perl_h but not /ex_perl_h/docName. Try changing your
RewriteRule to this:
RewriteRule ^/(.*) /ex_perl_h/$
Geoffrey Young wrote:
I'd check your logs but the common log format uses %>s. try
$r->last->status()
Aha! That's it, thanks a lot Geoff!
--
Michael Peters
Plus Three, LP
teps (lines 2-7) but after that it looks the same as
"/foo/index.pl" until you hit the die(). Then the status for "/foo/index.pl" goes to 500 while the
status for "/foo" stays at 200.
--
Michael Peters
Plus Three, LP
Adam Prime wrote:
You should package that up and put it on CPAN.
Attached is a version that works on mod_perl 1.
--
Michael Peters
Plus Three, LP
package Apache::Trace;
use strict;
use Apache::Log();
use Apache::Constants ':common';
our @Phases = qw(
PerlPostReadRequ
Ryan Gies wrote:
Below is an Apache log snippet which traces the handler phases for two
requests:
This is probably a really dumb question, but how do you get a log like that? I tried setting
"LogLevel debug" but no dice.
--
Michael Peters
Plus Three, LP
Michael Peters wrote:
No, I just get
URI: /foo/ STATUS: 200
Nothing else. The browser get's a 500 and the access log reports 500,
but the actual request gets a 200.
I even tried it from a log handler just to see if I get the same thing. Does it matter that I'm
using Apache::R
7;s a 500 and the access log reports 500, but the
actual request gets a 200.
--
Michael Peters
Plus Three, LP
l: 1
So they both show up as initial requests and the main request. Plus if it was subrequests that were
the problem I would have expected to see more than debug statement in the log since the cleanup
handler was getting more than once, right?
--
Michael Peters
Plus Three, LP
Adam Prime wrote:
Michael Peters wrote:
But when I make the request to just /foo (instead of /foo/index.pl) I
only get this in my error log:
URI: /foo/ STATUS: 200
you've said to /foo, but your error_log is saying /foo/. What's going
on there? mod_dir redirecting a bare directo
ror-notes') don't contain the right information).
So what's going on here. Shouldn't the 2 requests (/foo and /foo/index.pl) be
treated exactly the same?
--
Michael Peters
Plus Three, LP
bal variables or package level variables,
they will not be re-used by Perl.
--
Michael Peters
Plus Three, LP
e still get a real config file out
of it that we can inspect.
--
Michael Peters
Plus Three, LP
rl server on the same physical machine you need
a lot less RAM then if you just ran a mod_perl server trying to do static and dynamic requests.
HTH
--
Michael Peters
Plus Three, LP
inserting it, but I think that may be acceptable.
If you're really worried about someone attacking you in this way then insert the record with the
uuid first and then let them upload. If you don't find the uuid they are trying to upload to, then
they changed it so just disallow the up
::UUID). It's not sequential, but someone could still tweak the form
to create a value that could potentially conflict with another value in the future. But I'd say it's
much less likely than a sequential id.
--
Michael Peters
Plus Three, LP
1 - 100 of 307 matches
Mail list logo