You must configure it on both. The value does not have to be identical.
Say, you can have 35seconds on secondary and 30seconds on primary.
However, for simplicity, I recommend to have same values.
If you do not configure it, it will take the default value which is 180s.