I had a mistake in the config written in my original email, but it was
correct on my servers.


192.168.56.80 LocalSettings.php snippet:
```
$wgVirtualRestConfig['modules']['parsoid'] = array(
'url' => 'http://192.168.56.63:8001',
'HTTPProxy' => 'http://192.168.56.63:8001',

'domain' => $wikiId,
'prefix' => $wikiId
);
```

192.168.56.80 localsettings.js snippet:
```
parsoidConfig.setMwApi({
uri: 'http://192.168.56.63:8081/demo/api.php',
proxy: { uri: 'http://192.168.56.63:8081/' },

domain: 'demo',
prefix: 'demo'
});

parsoidConfig.serverInterface = '192.168.56.80';
```

192.168.56.60 LocalSettings.php snippet:
```
$wgVirtualRestConfig['modules']['parsoid'] = array(
'url' => 'http://192.168.56.63:8001',
'HTTPProxy' => 'http://192.168.56.63:8001',

'domain' => $wikiId,
'prefix' => $wikiId
);
```

192.168.56.60 localsettings.js snippet:
```
parsoidConfig.setMwApi({
uri: 'http://192.168.56.63:8081/demo/api.php',
proxy: { uri: 'http://192.168.56.63:8081/' },

domain: 'demo',
prefix: 'demo'
});

parsoidConfig.serverInterface = '192.168.56.60';
```

Sorry for the bad info, and thanks to Subramanya for pointing it out.

--James

On Wed, Jun 7, 2017 at 10:30 PM, James Montalvo <[email protected]>
wrote:

> Setting up RESTBase is very involved. I'd really prefer not to add that
> complexity at this time. Also I'm not sure at my scale RESTBase would
> provide much performance benefit (though I don't know much about it so
> that's just a hunch). The parsoid and VE configs have fields for proxy (as
> shown in my snippets), so it seems like running them this way is intended.
> Am I wrong?
>
> Thanks,
> James
>
> On Jun 7, 2017 8:12 PM, "C. Scott Ananian" <[email protected]> wrote:
>
>> I think in general the first thing you should do for performance is set up
>> restbase in front of parsoid? Caching the parsoid results will be faster
>> than running multiple parsoids in parallel.  That would also match the wmf
>> configuration more closely, which would probably help us help you.  I
>> wrote
>> up instructions for configuring restbase on the VE and Parsoid wiki pages.
>> As it turns out I updated these today to use VRS configuration. Let me
>> know
>> if you run into trouble, perhaps some further minor updates are necessary.
>>   --scott
>>
>> On Jun 7, 2017 6:26 PM, "James Montalvo" <[email protected]>
>> wrote:
>>
>> > I'm trying to setup two Parsoid servers to play nicely with two
>> MediaWiki
>> > application servers and am having some issues. I have no problem getting
>> > things working with Parsoid on a single app server, or multiple Parsoid
>> > servers being used by a single app server, but ran into issues when I
>> > increased to multiple app servers. To try to get this working I starting
>> > making the app and Parsoid servers communicate through my load
>> balancer. So
>> > an overview of my config is:
>> >
>> > Load balancer = 192.168.56.63
>> >
>> > App1 = 192.168.56.80
>> > App2 = 192.168.56.60
>> >
>> > Parsoid1 = 192.168.56.80
>> > Parsoid2 = 192.168.56.60
>> >
>> > Note, App1 and Parsoid1 are the same server, and App2 and Parsoid2 are
>> the
>> > same server. I can only spin up so many VMs on my laptop.
>> >
>> > The load balancer (HAProxy) is configured as follows:
>> > * 80 forwards to 443
>> > * 443 forwards to App1 and App2 port 8080
>> > * 8081 forwards to App1 and App2 port 8080 (this will be a private
>> network
>> > connection later)
>> > * 8001 forwards to Parsoid1 and Parsoid2 port 8000 (also will be
>> private)
>> >
>> > On App1/Parsoid1 I can run `curl 192.168.56.63:8001` and get the
>> > appropriate response from Parsoid. I can run `curl 192.168.56.63:8081`
>> and
>> > get the appropriate response from MediaWiki. The same is true for both
>> on
>> > App2/Parsoid2. So the servers can get the info they need from the
>> services.
>> >
>> > Currently I'm getting a the error "Error loading data from server: 500:
>> > docserver-http: HTTP 500. Would you like to retry?" when attempting to
>> use
>> > Visual Editor. I've tried various different settings and have not always
>> > gotten that specific error, but am getting it with the settings I
>> currently
>> > have in localsettings.js and LocalSettings.php (shown below in this
>> email).
>> > Removing the proxy config lines from these settings gave slightly better
>> > results. I did not get the 500 error, but instead it sometimes after a
>> very
>> > long time it would work. It also may have been throwing errors in the
>> > parsoid log (with debug on). I have those logs saved if they help. I'm
>> > hoping someone can just point out some misconfiguration, though.
>> >
>> > Here are snippets of my config files:
>> >
>> > On App1/Parsoid1, relevant localsettings.js:
>> >
>> > parsoidConfig.setMwApi({
>> >
>> > uri: 'http://192.168.56.80:8081/demo/api.php',
>> > proxy: { uri: 'http://192.168.56.80:8081/' },
>> > domain: 'demo',
>> > prefix: 'demo'
>> > } );
>> >
>> > parsoidConfig.serverInterface = '192.168.56.80';
>> >
>> >
>> > On App2/Parsoid2, relevant localsettings.js:
>> >
>> > parsoidConfig.setMwApi({
>> >
>> > uri: 'http://192.168.56.80:8081/demo/api.php',
>> > proxy: { uri: 'http://192.168.56.80:8081/' },
>> >
>> > domain: 'demo',
>> > prefix: 'demo'
>> >
>> > } );
>> >
>> > parsoidConfig.serverInterface = '192.168.56.60';
>> >
>> >
>> > On App1/Parsoid1, relevant LocalSettings.php:
>> >
>> > $wgVirtualRestConfig['modules']['parsoid'] = array(
>> > 'url' => '192.168.56.80:8001',
>> >
>> > 'HTTPProxy' => 'http://192.168.56.80:8001',
>> >
>> > 'domain' => $wikiId,
>> > 'prefix' => $wikiId
>> > );
>> >
>> >
>> > On App2/Parsoid2, relevant LocalSettings.php:
>> >
>> > $wgVirtualRestConfig['modules']['parsoid'] = array(
>> > 'url' => '192.168.56.80:8001',
>> >
>> > 'HTTPProxy' => 'http://192.168.56.80:8001',
>> >
>> > 'domain' => $wikiId,
>> > 'prefix' => $wikiId
>> > );
>> >
>> >
>> > Thanks!
>> >
>> > --James
>> > _______________________________________________
>> > Wikitech-l mailing list
>> > [email protected]
>> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>> _______________________________________________
>> Wikitech-l mailing list
>> [email protected]
>> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
>
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to