ROUTING : What's better? Server rewriting OR F3 routing?

50 views
Skip to first unread message

Emmanuel Simond

unread,
Mar 15, 2018, 9:20:44 AM3/15/18
to Fat-Free Framework
Hi all

Starting a new project served by the new F3!

Setting up the fast ROUTING : 


What is faster coz lighter of those 2 solutions:


==> Use  Apache mod_rewrite / nginx / Lighttpd rewrite-once 

OR

==> F3 routing ?



Thanks for your help and your time
Emmanuel


ikkez

unread,
Mar 15, 2018, 12:12:02 PM3/15/18
to Fat-Free Framework
you need both.. mod_rewrite or nginx try files routing will only push the "pretty-fied" URL like /news/awesome-cheesecake back to the index.php, where it is parsed by the F3 routing to resolve and load the appropriate controller that handles the request.

Emmanuel

unread,
Apr 2, 2018, 8:42:36 AM4/2/18
to Fat-Free Framework
@ikkez Yallo Christian

your right approach  too complicated  
better to bypass F3router

you now the portal get up to 100 users "at the same time" (they say concurrent right?  thus they don even knmos each oter right?)

so 100 hits X 36 HTTP requests for home page (yes many photos on the lanpage)
& 100 hits X 6 request for cached "details pages"

hence better to bypass either !nginx!Apache!!banshee!&co! 

and  option 1. use only  1 router

How to now welche|wich?)  is the quepard solution?

P.P.S.

right, most hits will hit the cache,.  Fortunately , no regexp here for the mass traffci 

ved

unread,
Apr 2, 2018, 9:11:26 AM4/2/18
to Fat-Free Framework
You seem to be replying to 2 different threads at the same time.

But anyway, what @ikkez stated is the correct way to use F3.

Can you explain better what exactly do you mean by bypassing F3's router? How would you use F3 in the first place?

Emmanuel

unread,
Apr 2, 2018, 11:50:27 AM4/2/18
to Fat-Free Framework

>>  explain better what exactly means bypassing F3's router? 

tha app has more than 1 entry door.  Usually F3 powerd apps start to come to live with 'index.php'  , right ? 

then some F3 routing is delclared , ALL !  while we only need one route at this moment

so better to use the 1st router in place on the webserver instead of re+creating it at the PHP level



httpload -parallel 38 -seconds 60 test-004_F3_db_maria_select1.txt 

On Thursday, March 15, 2018 at 6:50:44 PM UTC+5:30, Emmanuel Simond wrote:

ved

unread,
Apr 2, 2018, 12:30:36 PM4/2/18
to Fat-Free Framework
There's really no such thing as "recreating of the webserver's rewrite rule at the PHP level". They're different things.

The rewrite that is configured at the webserver is in order to redirect all http requests straight into your main index.php where F3 will process that request.

What gets passed to said index.php is the verb and route that you'll have to define on F3's routing parameters in order to have something execute when said route is matched. This can be stuff like GET /, GET /about, POST /contact, etc.

AFAIK, there's no way to use F3 without defining at least one route.

So, I'm sorry but it's still not clear what you're trying to achieve exactly or I don't understand what you mean.

What do you mean with "the app has more than one entry point"?
Reply all
Reply to author
Forward
0 new messages